Simple test to check permissions with the new OAuth2 implementation
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
a3fd8ba063
commit
fbf64db16e
2 changed files with 95 additions and 1 deletions
|
|
@ -48,7 +48,7 @@ class PermissionBackend(ModelBackend):
|
|||
user = request.user
|
||||
|
||||
def permission_filter(membership_obj):
|
||||
return Q(mask__rank__lte=request.session.get("permission_mask", -1))
|
||||
return Q(mask__rank__lte=request.session.get("permission_mask", 42))
|
||||
|
||||
if user.is_anonymous:
|
||||
# Unauthenticated users have no permissions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue