Commit 337500bd authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[schema] Add permissions to TransformationSequence entity type

parent e10b4cbe1624
......@@ -209,10 +209,22 @@ class transformation_sequence(RelationDefinition):
cardinality = '1*'
_transformationsequence_update_perms = (
ERQLExpression('U in_group G, G name IN ("managers", "users"), '
'NOT EXISTS(P transformation_sequence X) OR '
'EXISTS(P transformation_sequence X,'
' P name "wfs_dataprocess_initialized")'),
class TransformationSequence(EntityType):
"""A sequence of scripts involved in a given process."""
# TODO __permissions__
# name = String(required=True) XXX useful?
__permissions__ = {
'read': ('managers', 'users', 'guests'),
'update': _transformationsequence_update_perms,
'delete': _transformationsequence_update_perms,
'add': ('managers', 'users')
class TransformationStep(EntityType):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment