fix #636936: read_permission relation should not be mandatory
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 21 Jan 2010 17:03:30 +0100
changeset 4319 3b72c7e6149d
parent 4314 e12ee4a009bc
child 4320 4efd4c306746
fix #636936: read_permission relation should not be mandatory
misc/migration/3.6.0_Any.py
schemas/bootstrap.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/misc/migration/3.6.0_Any.py	Thu Jan 21 17:03:30 2010 +0100
@@ -0,0 +1,1 @@
+sync_schema_props_perms('read_permission', syncperms=False) # fix read_permission cardinality
--- a/schemas/bootstrap.py	Thu Jan 21 11:08:41 2010 +0100
+++ b/schemas/bootstrap.py	Thu Jan 21 17:03:30 2010 +0100
@@ -131,7 +131,7 @@
                                       'relation\'subject, object and to '
                                       'the request user. '))
 
-    read_permission = ObjectRelation(('CWEType', 'CWAttribute', 'CWRelation'), cardinality='+?', composite='subject',
+    read_permission = ObjectRelation(('CWEType', 'CWAttribute', 'CWRelation'), cardinality='*?', composite='subject',
                                       description=_('rql expression allowing to read entities/relations of this type'))
     add_permission = ObjectRelation(('CWEType', 'CWAttribute', 'CWRelation'), cardinality='*?', composite='subject',
                                      description=_('rql expression allowing to add entities/relations of this type'))
@@ -162,7 +162,7 @@
     name = String(required=True, indexed=True, internationalizable=True,
                   unique=True, maxsize=64)
 
-    read_permission = ObjectRelation(('CWEType', 'CWAttribute', 'CWRelation'), cardinality='+*',
+    read_permission = ObjectRelation(('CWEType', 'CWAttribute', 'CWRelation'), cardinality='**',
                                       description=_('groups allowed to read entities/relations of this type'))
     add_permission = ObjectRelation(('CWEType', 'CWAttribute', 'CWRelation'),
                                      description=_('groups allowed to add entities/relations of this type'))