We don't need a session to have permissions

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2021-03-09 09:41:27 +01:00
parent b5ef937a03
commit 56c5fa4057
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 0 additions and 2 deletions

View File

@ -134,8 +134,6 @@ class PermissionBackend(ModelBackend):
return False return False
sess = get_current_session() sess = get_current_session()
if sess is not None and sess.session_key is None:
return False
if user_obj.is_superuser and sess.get("permission_mask", -1) >= 42: if user_obj.is_superuser and sess.get("permission_mask", -1) >= 42:
return True return True