set strict when checking if edit action should be shown 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 16 Sep 2009 19:25:01 +0200
branch3.5
changeset 3271 6c8504b2ade0
parent 3270 ae43a0ddc1d9
child 3272 f46f2082468b
set strict when checking if edit action should be shown
web/views/actions.py
--- a/web/views/actions.py	Wed Sep 16 18:25:13 2009 +0200
+++ b/web/views/actions.py	Wed Sep 16 19:25:01 2009 +0200
@@ -32,10 +32,10 @@
         # if user has no update right but it can modify some relation,
         # display action anyway
         for dummy in AutomaticEntityForm.esrelations_by_category(
-            entity, 'generic', 'add'):
+            entity, 'generic', 'add', strict=True):
             return 1
         for rschema, targetschemas, role in AutomaticEntityForm.erelations_by_category(
-            entity, ('primary', 'secondary'), 'add'):
+            entity, ('primary', 'secondary'), 'add', strict=True):
             if not rschema.is_final():
                 return 1
         return 0