superusers should have all permissions for now
This commit is contained in:
parent
85698dc13b
commit
cdca60b307
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,9 @@ class AccessPermission(models.Model):
|
|||
if not request.user.is_authenticated:
|
||||
return set()
|
||||
|
||||
if request.user.is_superuser:
|
||||
return set(AccessRestriction.objects.all().values_list('pk', flat=True))
|
||||
|
||||
cache_key = cls.user_access_permission_key(request.user)
|
||||
access_restriction_ids = cache.get(cache_key, None)
|
||||
if access_restriction_ids is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue