Remove special case handling of clone_of when setting permissions
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 10 Apr 2017 16:16:10 +0200
changeset 2616 45cae2f412d1
parent 2615 457b1133267d
child 2617 76bb0064f236
Remove special case handling of clone_of when setting permissions It should simply be skipped by adding it to GRAPH_SKIP_RTYPES.
cubicweb_seda/__init__.py
cubicweb_seda/schema/__init__.py
--- a/cubicweb_seda/__init__.py	Mon Apr 10 16:14:05 2017 +0200
+++ b/cubicweb_seda/__init__.py	Mon Apr 10 16:16:10 2017 +0200
@@ -23,7 +23,7 @@
 
 # control of compound graph by adding etype / rtype to the corresponding set below
 GRAPH_SKIP_ETYPES = set()
-GRAPH_SKIP_RTYPES = set(['container'])
+GRAPH_SKIP_RTYPES = set(['container', 'clone_of'])
 
 
 def seda_profile_container_def(schema):
--- a/cubicweb_seda/schema/__init__.py	Mon Apr 10 16:14:05 2017 +0200
+++ b/cubicweb_seda/schema/__init__.py	Mon Apr 10 16:16:10 2017 +0200
@@ -196,8 +196,6 @@
     # set permissions on all relation defs related to the compound graph according to permission on
     # the container entity
     for rdef, role in iter_all_rdefs(schema, 'SEDAArchiveTransfer'):
-        if rdef.rtype == 'clone_of':
-            continue
         if role == 'subject':
             target_etype, var = rdef.subject, 'S'
         else: