diff --git a/cotisations/acl.py b/cotisations/acl.py index 091d2c26..4e9b518a 100644 --- a/cotisations/acl.py +++ b/cotisations/acl.py @@ -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." diff --git a/logs/acl.py b/logs/acl.py index 5f6c768a..9a61d602 100644 --- a/logs/acl.py +++ b/logs/acl.py @@ -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." diff --git a/machines/acl.py b/machines/acl.py index 565dfdcd..6b6da213 100644 --- a/machines/acl.py +++ b/machines/acl.py @@ -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." diff --git a/preferences/acl.py b/preferences/acl.py index f4f11ba1..90deaf23 100644 --- a/preferences/acl.py +++ b/preferences/acl.py @@ -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." diff --git a/topologie/acl.py b/topologie/acl.py index 4a0a98c0..38b5198a 100644 --- a/topologie/acl.py +++ b/topologie/acl.py @@ -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." diff --git a/users/acl.py b/users/acl.py index 85c53e43..5f297b5c 100644 --- a/users/acl.py +++ b/users/acl.py @@ -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."