Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
Commits
39ac8423
Commit
39ac8423
authored
Aug 01, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: rename getXXX to getGuardXXX (properties defined in Guard property sheet)
parent
37040ea8
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
53 deletions
+53
-53
product/ERP5Workflow/Document/Interaction.py
product/ERP5Workflow/Document/Interaction.py
+12
-12
product/ERP5Workflow/Document/InteractionWorkflow.py
product/ERP5Workflow/Document/InteractionWorkflow.py
+1
-1
product/ERP5Workflow/Document/Transition.py
product/ERP5Workflow/Document/Transition.py
+8
-8
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+8
-8
product/ERP5Workflow/Document/WorkflowVariable.py
product/ERP5Workflow/Document/WorkflowVariable.py
+12
-12
product/ERP5Workflow/Document/Worklist.py
product/ERP5Workflow/Document/Worklist.py
+12
-12
No files found.
product/ERP5Workflow/Document/Interaction.py
View file @
39ac8423
...
@@ -94,10 +94,10 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
...
@@ -94,10 +94,10 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
return
res
return
res
def
getGuard
(
self
):
def
getGuard
(
self
):
if
self
.
get
RoleList
()
is
None
and
\
if
self
.
get
GuardRole
()
is
None
and
\
self
.
get
PermissionList
()
is
None
and
\
self
.
get
GuardPermission
()
is
None
and
\
self
.
getG
roupList
()
is
None
and
\
self
.
getG
uardGroup
()
is
None
and
\
self
.
getExpression
()
is
None
and
\
self
.
get
Guard
Expression
()
is
None
and
\
self
.
guard
is
None
:
self
.
guard
is
None
:
return
Guard
().
__of__
(
self
)
return
Guard
().
__of__
(
self
)
elif
self
.
guard
is
None
:
elif
self
.
guard
is
None
:
...
@@ -106,11 +106,11 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
...
@@ -106,11 +106,11 @@ class Interaction(IdAsReferenceMixin('interaction_', "prefix"), XMLObject):
def
generateGuard
(
self
):
def
generateGuard
(
self
):
self
.
guard
=
Guard
()
self
.
guard
=
Guard
()
if
self
.
get
RoleList
()
is
not
None
:
if
self
.
get
GuardRole
()
is
not
None
:
self
.
guard
.
roles
=
self
.
get
RoleList
()
self
.
guard
.
roles
=
self
.
get
GuardRole
()
if
self
.
get
PermissionList
()
is
not
None
:
if
self
.
get
GuardPermission
()
is
not
None
:
self
.
guard
.
permissions
=
self
.
get
PermissionList
()
self
.
guard
.
permissions
=
self
.
get
GuardPermission
()
if
self
.
getG
roupList
()
is
not
None
:
if
self
.
getG
uardGroup
()
is
not
None
:
self
.
guard
.
groups
=
self
.
getG
roupList
()
self
.
guard
.
groups
=
self
.
getG
uardGroup
()
if
self
.
getExpression
()
is
not
None
:
if
self
.
get
Guard
Expression
()
is
not
None
:
self
.
guard
.
expr
=
Expression
(
self
.
getExpression
())
self
.
guard
.
expr
=
Expression
(
self
.
get
Guard
Expression
())
product/ERP5Workflow/Document/InteractionWorkflow.py
View file @
39ac8423
...
@@ -430,7 +430,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
...
@@ -430,7 +430,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
property_value
=
tuple
(
property_value
)
property_value
=
tuple
(
property_value
)
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
elif
property_id
==
'expr'
:
elif
property_id
==
'expr'
:
property_value
=
tdef
.
getExpression
()
property_value
=
tdef
.
get
Guard
Expression
()
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
# no-property definded action box configuration
# no-property definded action box configuration
elif
property_id
in
[
'actbox_name'
,
'actbox_url'
,
'actbox_category'
,
'trigger_type'
]:
elif
property_id
in
[
'actbox_name'
,
'actbox_url'
,
'actbox_category'
,
'trigger_type'
]:
...
...
product/ERP5Workflow/Document/Transition.py
View file @
39ac8423
...
@@ -99,11 +99,11 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject):
...
@@ -99,11 +99,11 @@ class Transition(IdAsReferenceMixin("transition_", "prefix"), XMLObject):
def
generateGuard
(
self
):
def
generateGuard
(
self
):
if
self
.
guard
is
None
:
if
self
.
guard
is
None
:
self
.
guard
=
Guard
()
self
.
guard
=
Guard
()
if
self
.
get
RoleList
()
is
not
None
:
if
self
.
get
GuardRole
()
is
not
None
:
self
.
guard
.
roles
=
self
.
get
RoleList
()
self
.
guard
.
roles
=
self
.
get
GuardRole
()
if
self
.
get
PermissionList
()
is
not
None
:
if
self
.
get
GuardPermission
()
is
not
None
:
self
.
guard
.
permissions
=
self
.
get
PermissionList
()
self
.
guard
.
permissions
=
self
.
get
GuardPermission
()
if
self
.
getG
roupList
()
is
not
None
:
if
self
.
getG
uardGroup
()
is
not
None
:
self
.
guard
.
groups
=
self
.
getG
roupList
()
self
.
guard
.
groups
=
self
.
getG
uardGroup
()
if
self
.
getExpression
()
is
not
None
:
if
self
.
get
Guard
Expression
()
is
not
None
:
self
.
guard
.
expr
=
Expression
(
self
.
getExpression
())
self
.
guard
.
expr
=
Expression
(
self
.
get
Guard
Expression
())
product/ERP5Workflow/Document/Workflow.py
View file @
39ac8423
...
@@ -850,13 +850,13 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
...
@@ -850,13 +850,13 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
for
property_id
in
sorted
(
transition_prop_id_to_show
):
for
property_id
in
sorted
(
transition_prop_id_to_show
):
if
property_id
in
(
'roles'
,
'groups'
,
'permissions'
,
'expr'
,):
if
property_id
in
(
'roles'
,
'groups'
,
'permissions'
,
'expr'
,):
if
property_id
==
'roles'
:
if
property_id
==
'roles'
:
property_value
=
tdef
.
get
RoleList
()
property_value
=
tdef
.
get
GuardRole
()
if
property_id
==
'groups'
:
if
property_id
==
'groups'
:
property_value
=
tdef
.
getG
roupList
()
property_value
=
tdef
.
getG
uardGroup
()
if
property_id
==
'permissions'
:
if
property_id
==
'permissions'
:
property_value
=
tdef
.
get
PermissionList
()
property_value
=
tdef
.
get
GuardPermission
()
if
property_id
==
'expr'
:
if
property_id
==
'expr'
:
property_value
=
tdef
.
getExpression
()
property_value
=
tdef
.
get
Guard
Expression
()
if
property_value
is
None
or
property_value
==
[]
or
property_value
==
():
if
property_value
is
None
or
property_value
==
[]
or
property_value
==
():
property_value
=
''
property_value
=
''
elif
property_id
!=
'expr'
:
elif
property_id
!=
'expr'
:
...
@@ -949,13 +949,13 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
...
@@ -949,13 +949,13 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
# show guard configuration:
# show guard configuration:
if
property_id
in
(
'roles'
,
'groups'
,
'permissions'
,
'expr'
,):
if
property_id
in
(
'roles'
,
'groups'
,
'permissions'
,
'expr'
,):
if
property_id
==
'roles'
:
if
property_id
==
'roles'
:
property_value
=
qdef
.
get
RoleList
()
property_value
=
qdef
.
get
GuardRole
()
if
property_id
==
'groups'
:
if
property_id
==
'groups'
:
property_value
=
qdef
.
getG
roupList
()
property_value
=
qdef
.
getG
uardGroup
()
if
property_id
==
'permissions'
:
if
property_id
==
'permissions'
:
property_value
=
qdef
.
get
PermissionList
()
property_value
=
qdef
.
get
GuardPermission
()
if
property_id
==
'expr'
:
if
property_id
==
'expr'
:
property_value
=
qdef
.
getExpression
()
property_value
=
qdef
.
get
Guard
Expression
()
if
property_value
is
not
None
:
if
property_value
is
not
None
:
property_value
=
tuple
(
property_value
)
property_value
=
tuple
(
property_value
)
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
...
...
product/ERP5Workflow/Document/WorkflowVariable.py
View file @
39ac8423
...
@@ -72,10 +72,10 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
...
@@ -72,10 +72,10 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
return
res
return
res
def
getInfoGuard
(
self
):
def
getInfoGuard
(
self
):
if
self
.
get
RoleList
()
is
None
and
\
if
self
.
get
GuardRole
()
is
None
and
\
self
.
get
PermissionList
()
is
None
and
\
self
.
get
GuardPermission
()
is
None
and
\
self
.
getG
roupList
()
is
None
and
\
self
.
getG
uardGroup
()
is
None
and
\
self
.
getExpression
()
is
None
and
\
self
.
get
Guard
Expression
()
is
None
and
\
self
.
info_guard
is
None
:
self
.
info_guard
is
None
:
return
Guard
().
__of__
(
self
)
return
Guard
().
__of__
(
self
)
elif
self
.
info_guard
is
None
:
elif
self
.
info_guard
is
None
:
...
@@ -84,11 +84,11 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
...
@@ -84,11 +84,11 @@ class WorkflowVariable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
def
generateInfoGuard
(
self
):
def
generateInfoGuard
(
self
):
self
.
info_guard
=
Guard
()
self
.
info_guard
=
Guard
()
if
self
.
get
RoleList
()
is
not
None
:
if
self
.
get
GuardRole
()
is
not
None
:
self
.
info_guard
.
roles
=
self
.
get
RoleList
()
self
.
info_guard
.
roles
=
self
.
get
GuardRole
()
if
self
.
get
PermissionList
()
is
not
None
:
if
self
.
get
GuardPermission
()
is
not
None
:
self
.
info_guard
.
permissions
=
self
.
get
PermissionList
()
self
.
info_guard
.
permissions
=
self
.
get
GuardPermission
()
if
self
.
getG
roupList
()
is
not
None
:
if
self
.
getG
uardGroup
()
is
not
None
:
self
.
info_guard
.
groups
=
self
.
getG
roupList
()
self
.
info_guard
.
groups
=
self
.
getG
uardGroup
()
if
self
.
getExpression
()
is
not
None
:
if
self
.
get
Guard
Expression
()
is
not
None
:
self
.
info_guard
.
expr
=
Expression
(
self
.
getExpression
())
self
.
info_guard
.
expr
=
Expression
(
self
.
get
Guard
Expression
())
product/ERP5Workflow/Document/Worklist.py
View file @
39ac8423
...
@@ -84,10 +84,10 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
...
@@ -84,10 +84,10 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
return res
return res
def getGuard(self):
def getGuard(self):
if self.get
RoleList
() is None and
\
if self.get
GuardRole
() is None and
\
self.get
PermissionList
() is None and
\
self.get
GuardPermission
() is None and
\
self.getG
roupList
() is None and
\
self.getG
uardGroup
() is None and
\
self.getExpression() is None and
\
self.get
Guard
Expression() is None and
\
self.guard is None:
self.guard is None:
return Guard().__of__(self)
return Guard().__of__(self)
elif self.guard is None:
elif self.guard is None:
...
@@ -96,14 +96,14 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
...
@@ -96,14 +96,14 @@ class Worklist(IdAsReferenceMixin("worklist_", "prefix"), XMLObject):
def generateGuard(self):
def generateGuard(self):
self.guard = Guard()
self.guard = Guard()
if self.get
RoleList
() is not None:
if self.get
GuardRole
() is not None:
self.guard.roles = self.get
RoleList
()
self.guard.roles = self.get
GuardRole
()
if self.get
PermissionList
() is not None:
if self.get
GuardPermission
() is not None:
self.guard.permissions = self.get
PermissionList
()
self.guard.permissions = self.get
GuardPermission
()
if self.getG
roupList
() is not None:
if self.getG
uardGroup
() is not None:
self.guard.groups = self.getG
roupList
()
self.guard.groups = self.getG
uardGroup
()
if self.getExpression() is not None:
if self.get
Guard
Expression() is not None:
self.guard.expr = Expression(self.getExpression())
self.guard.expr = Expression(self.get
Guard
Expression())
def getAvailableCatalogVars(self):
def getAvailableCatalogVars(self):
res = []
res = []
...
...
Write
Preview
Markdown
is supported
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