mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-23 23:43:47 +00:00
Utilise has_module_perms, bien pratique
This commit is contained in:
parent
8ea20f93dd
commit
68e954db3c
6 changed files with 6 additions and 6 deletions
|
@ -35,5 +35,5 @@ def can_view(user):
|
|||
A couple (allowed, msg) where allowed is a boolean which is True if
|
||||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_perm('cotisation.view_app_cotisation')
|
||||
can = user.has_module_perms('cotisations')
|
||||
return can, None if can else "Vous ne pouvez pas voir cette application."
|
||||
|
|
|
@ -35,5 +35,5 @@ def can_view(user):
|
|||
A couple (allowed, msg) where allowed is a boolean which is True if
|
||||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_perms(('cableur',))
|
||||
can = user.has_module_perms('logs')
|
||||
return can, None if can else "Vous ne pouvez pas voir cette application."
|
||||
|
|
|
@ -35,5 +35,5 @@ def can_view(user):
|
|||
A couple (allowed, msg) where allowed is a boolean which is True if
|
||||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_perms(('cableur',))
|
||||
can = user.has_module_perms('machines')
|
||||
return can, None if can else "Vous ne pouvez pas voir cette application."
|
||||
|
|
|
@ -35,5 +35,5 @@ def can_view(user):
|
|||
A couple (allowed, msg) where allowed is a boolean which is True if
|
||||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_perms(('cableur',))
|
||||
can = user.has_module_perms('preferences')
|
||||
return can, None if can else "Vous ne pouvez pas voir cette application."
|
||||
|
|
|
@ -35,5 +35,5 @@ def can_view(user):
|
|||
A couple (allowed, msg) where allowed is a boolean which is True if
|
||||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_perms(('cableur',))
|
||||
can = user.has_module_perms('topologie')
|
||||
return can, None if can else "Vous ne pouvez pas voir cette application."
|
||||
|
|
|
@ -35,5 +35,5 @@ def can_view(user):
|
|||
A couple (allowed, msg) where allowed is a boolean which is True if
|
||||
viewing is granted and msg is a message (can be None).
|
||||
"""
|
||||
can = user.has_perms(('cableur',))
|
||||
can = user.has_module_perms('users')
|
||||
return can, None if can else "Vous ne pouvez pas voir cette application."
|
||||
|
|
Loading…
Reference in a new issue