diff --git a/re2o/acl.py b/re2o/acl.py index bea27251..ffbbea42 100644 --- a/re2o/acl.py +++ b/re2o/acl.py @@ -78,7 +78,7 @@ def can_edit(model, *field_list): kwargs={'userid':str(request.user.id)} )) for field in field_list: - can_change = getattr(model, 'can_change_' + field) + can_change = getattr(instance, 'can_change_' + field) can, msg = can_change(request.user, *args, **kwargs) if not can: messages.error(request, msg or "Vous ne pouvez pas accéder à ce menu") diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index 27d699ac..acbec931 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -38,14 +38,18 @@ with this program; if not, write to the Free Software Foundation, Inc., Changer le mot de passe + {% can_change User state %} Changer le statut + {% acl_end %} + {% can_change User groups %} Gérer les groupes + {% acl_end %} Historique