made auth test user/pw simplier
This commit is contained in:
@@ -39,9 +39,6 @@ class PasswordTools:
|
||||
|
||||
def check(self, username: str, password: str) -> bool:
|
||||
user = self.get_by_name(username)
|
||||
if not user:
|
||||
print("Wrong user")
|
||||
return False
|
||||
user_pw = user.password_hash
|
||||
return argon2.verify(password, user_pw)
|
||||
|
||||
|
||||
@@ -43,12 +43,10 @@ class App:
|
||||
return perm, user_id
|
||||
else:
|
||||
self.view.display_co_failed()
|
||||
return None
|
||||
quit()
|
||||
|
||||
def start(self):
|
||||
team, user_id = self.connect()
|
||||
if not user_id:
|
||||
exit()
|
||||
if team == 1:
|
||||
CommercialMenu(self.customer_tools,
|
||||
self.contract_tools,
|
||||
|
||||
Reference in New Issue
Block a user