fix #814266: at creation time, you 'are not allowed to perform add operation on relation Expense spent_for Workcase' by fixing rql expression used for add/delete permission checking stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 14 Apr 2010 10:23:55 +0200
branchstable
changeset 40 cd389fa98526
parent 39 e077ae350ef3
child 41 6f326f9908bd
fix #814266: at creation time, you 'are not allowed to perform add operation on relation Expense spent_for Workcase' by fixing rql expression used for add/delete permission checking
migration/0.5.1_Any.py
schema.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/migration/0.5.1_Any.py	Wed Apr 14 10:23:55 2010 +0200
@@ -0,0 +1,1 @@
+sync_schema_props_perms('spent_for', syncprops=False)
--- a/schema.py	Tue Mar 23 15:35:49 2010 +0100
+++ b/schema.py	Wed Apr 14 10:23:55 2010 +0200
@@ -8,6 +8,6 @@
     cardinality = '?*'
     __permissions__ = {
         'read' : ('managers', 'users'),
-        'add': ('managers', RRQLExpression('S in_state ST, NOT ST name "accepted"')),
-        'delete': ('managers', RRQLExpression('S in_state ST, NOT ST name "accepted"')),
+        'add': ('managers', RRQLExpression('NOT (S in_state ST, ST name "accepted")')),
+        'delete': ('managers', RRQLExpression('NOT (S in_state ST, ST name "accepted")')),
         }