See #212: user detail profile

This commit is contained in:
Eliot Berriot 2018-06-19 20:11:40 +02:00
parent 8e6b6f454a
commit 8636b456a8
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
6 changed files with 231 additions and 4 deletions

View file

@ -94,6 +94,10 @@ class User(AbstractUser):
perms[p] = v
return perms
@property
def all_permissions(self):
return self.get_permissions()
def has_permissions(self, *perms, **kwargs):
operator = kwargs.pop("operator", "and")
if operator not in ["and", "or"]: