#3774
[auf_rh_dae.git] / project / rh / admin.py
index 69cc59b..c257513 100644 (file)
@@ -18,6 +18,7 @@ from project import groups
 from project.decorators import in_drh_or_admin
 from project.rh import models as rh
 from project.permissions import user_gere_obj_de_sa_region, \
+        user_can_list_obj, \
         user_can_add_obj, \
         user_can_change_obj, \
         user_can_delete_obj, \
@@ -171,7 +172,10 @@ class ProtectRegionMixin(object):
         return user_can_add_obj(request.user)
 
     def has_change_permission(self, request, obj=None):
-        return user_can_change_obj(request.user, obj) if obj else True
+        if obj is None:
+            return user_can_list_obj(request.user)
+        else:
+            return user_can_change_obj(request.user, obj)
 
     def has_delete_permission(self, request, obj=None):
         return user_can_delete_obj(request.user, obj) if obj else True