This commit is contained in:
Élie Bouttier 2014-08-09 01:13:42 -07:00
parent fde1c147c9
commit 3a211b74a4
13 changed files with 238 additions and 146 deletions

View file

@ -5,10 +5,11 @@ from issue.models import *
def user_has_perm(user, perm, perms):
for p in perms:
# this permission allow that action and the user is concerned by this permission
# this perm allow that action and the user is concerned by this perm
if hasattr(p, perm) and getattr(p, perm) and p.granted_to(user):
return True
class ProjectBackend(ModelBackend):
def has_perm(self, user, perm, obj=None):