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
No known key found for this signature in database
GPG key ID: 3A75C55819C8CF85

View file

@ -134,8 +134,6 @@ class PermissionBackend(ModelBackend):
return False
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:
return True