from nntp.tiny.db import DatabaseTable from nntp.tiny.passwd import compare class User(DatabaseTable): name = 'server_user' key = 'id' columns = 'id', 'active', 'username', 'password', 'fullname', 'mail', def auth(self, password: str): if self.active is False or or self.password is None or self.password == '': return False return compare(password, self.password)