pep8
This commit is contained in:
parent
fde1c147c9
commit
3a211b74a4
13 changed files with 238 additions and 146 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue