[schema] fix permissions for execution_log (TestExecution to File)
authorPaul Tonelli <paul.tonelli@logilab.fr>
Tue, 01 Apr 2014 16:13:17 +0200
changeset 1479 cd9504d6fa16
parent 1478 0f8d3902bb11
child 1480 7d22bbad8323
[schema] fix permissions for execution_log (TestExecution to File) The relation execution_log, inherited from Plan by TestExecution does not inherit the associated permissions unless they are explicit.
schema.py
--- a/schema.py	Thu Mar 27 16:46:29 2014 +0100
+++ b/schema.py	Tue Apr 01 16:13:17 2014 +0200
@@ -281,6 +281,17 @@
                     )
     branch = String(indexed=True, __permissions__=IMMUTABLE_ATTR_PERMS, required=True)
 
+class execution_log(RelationDefinition):
+    __permissions__ = {
+        'read':   ('managers', 'users', 'guests', 'narval'),
+        'add':    ('managers', 'narval',),
+        'delete': ('managers',),
+        }
+    subject = 'TestExecution'
+    object = 'File'
+    cardinality = '??'
+    composite = 'subject'
+    inlined = True
 
 class CheckResult(EntityType):
     """group results of execution of a specific test on a project"""