mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-06-25 21:50:55 +00:00
Fixed SIM103 (needless-bool): Return the condition "admin" in privs
directly
This commit is contained in:
parent
3fa0819e04
commit
e3ef6d726b
@ -688,8 +688,7 @@ def check_request_cookie_for_admin_access():
|
||||
if not session: return False
|
||||
privs = get_mail_user_privileges(session["email"], env)
|
||||
if not isinstance(privs, list): return False
|
||||
if "admin" not in privs: return False
|
||||
return True
|
||||
return "admin" in privs
|
||||
|
||||
def authorized_personnel_only_via_cookie(f):
|
||||
@wraps(f)
|
||||
|
Loading…
Reference in New Issue
Block a user