Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
dataprocessing
Commits
995185b6780e
Commit
337500bd
authored
Jan 19, 2017
by
Denis Laxalde
Browse files
[schema] Add permissions to TransformationSequence entity type
parent
e10b4cbe1624
Changes
2
Hide whitespace changes
Inline
Side-by-side
migration/0.3.0_Any.py
View file @
995185b6
sync_schema_props_perms
(
'transformation_sequence'
)
sync_schema_props_perms
(
'TransformationSequence'
)
schema.py
View file @
995185b6
...
...
@@ -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
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment