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:
|
def check(self, username: str, password: str) -> bool:
|
||||||
user = self.get_by_name(username)
|
user = self.get_by_name(username)
|
||||||
if not user:
|
|
||||||
print("Wrong user")
|
|
||||||
return False
|
|
||||||
user_pw = user.password_hash
|
user_pw = user.password_hash
|
||||||
return argon2.verify(password, user_pw)
|
return argon2.verify(password, user_pw)
|
||||||
|
|
||||||
|
|||||||
@@ -43,12 +43,10 @@ class App:
|
|||||||
return perm, user_id
|
return perm, user_id
|
||||||
else:
|
else:
|
||||||
self.view.display_co_failed()
|
self.view.display_co_failed()
|
||||||
return None
|
quit()
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
team, user_id = self.connect()
|
team, user_id = self.connect()
|
||||||
if not user_id:
|
|
||||||
exit()
|
|
||||||
if team == 1:
|
if team == 1:
|
||||||
CommercialMenu(self.customer_tools,
|
CommercialMenu(self.customer_tools,
|
||||||
self.contract_tools,
|
self.contract_tools,
|
||||||
|
|||||||
Reference in New Issue
Block a user