Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Leymonerie
slapos.core
Commits
fbf0046a
Commit
fbf0046a
authored
Dec 08, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud: Bootstrap organisation slap interface workflow
parent
73322912
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
1184 additions
and
9 deletions
+1184
-9
master/bt5/slapos_cloud/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow.xml
.../portal_workflow/organisation_slap_interface_workflow.xml
+108
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_acceptInvitation.py
...nterface_workflow/script_Organisation_acceptInvitation.py
+48
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_acceptInvitation.xml
...terface_workflow/script_Organisation_acceptInvitation.xml
+84
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_approveRegistration.py
...rface_workflow/script_Organisation_approveRegistration.py
+41
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_approveRegistration.xml
...face_workflow/script_Organisation_approveRegistration.xml
+84
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_checkConsistency.py
...nterface_workflow/script_Organisation_checkConsistency.py
+2
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_checkConsistency.xml
...terface_workflow/script_Organisation_checkConsistency.xml
+78
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_generateInvitation.py
...erface_workflow/script_Organisation_generateInvitation.py
+24
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_generateInvitation.xml
...rface_workflow/script_Organisation_generateInvitation.xml
+78
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_leaveOrganisation.py
...terface_workflow/script_Organisation_leaveOrganisation.py
+12
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_leaveOrganisation.xml
...erface_workflow/script_Organisation_leaveOrganisation.xml
+86
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/state_draft.xml
...flow/organisation_slap_interface_workflow/state_draft.xml
+79
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/transition_accept_invitation.xml
..._slap_interface_workflow/transition_accept_invitation.xml
+3
-3
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/transition_approve_registration.xml
...ap_interface_workflow/transition_approve_registration.xml
+68
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/transition_leave_organisation.xml
...slap_interface_workflow/transition_leave_organisation.xml
+68
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_action.xml
.../organisation_slap_interface_workflow/variable_action.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_actor.xml
...w/organisation_slap_interface_workflow/variable_actor.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_comment.xml
...organisation_slap_interface_workflow/variable_comment.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_error_message.xml
...sation_slap_interface_workflow/variable_error_message.xml
+42
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_history.xml
...organisation_slap_interface_workflow/variable_history.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_portal_type.xml
...nisation_slap_interface_workflow/variable_portal_type.xml
+42
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_time.xml
...ow/organisation_slap_interface_workflow/variable_time.xml
+46
-0
master/bt5/slapos_cloud/bt/template_portal_type_workflow_chain_list
.../slapos_cloud/bt/template_portal_type_workflow_chain_list
+1
-0
master/bt5/slapos_cloud/bt/template_workflow_id_list
master/bt5/slapos_cloud/bt/template_workflow_id_list
+1
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Organisation_closeRelatedAssignment.py
...pos_hal_json_style/Organisation_closeRelatedAssignment.py
+1
-6
No files found.
master/bt5/slapos_cloud/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
fbf0046a
...
...
@@ -15,6 +15,10 @@
<type>
Instance Tree
</type>
<workflow>
edit_workflow, instance_slap_interface_workflow, instance_tree_workflow
</workflow>
</chain>
<chain>
<type>
Organisation
</type>
<workflow>
organisation_slap_interface_workflow
</workflow>
</chain>
<chain>
<type>
Person
</type>
<workflow>
person_slap_interface_workflow
</workflow>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_count
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_mt_index
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
_tree
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAQ=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
source/portal_workflow/organisation_slap_interface_workflow/state_draft
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
person_slap_interface_workflow
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
organisation_slap_interface_workflow
</string>
</value>
</item>
<item>
<key>
<string>
language
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
manager_bypass
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow
</string>
</value>
</item>
<item>
<key>
<string>
state_variable
</string>
</key>
<value>
<string>
slap_state
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Organisation Slap Interface Workflow
</string>
</value>
</item>
<item>
<key>
<string>
workflow_managed_permission
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Length"
module=
"BTrees.Length"
/>
</pickle>
<pickle>
<int>
0
</int>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record
id=
"4"
aka=
"AAAAAAAAAAQ="
>
<pickle>
<global
name=
"OOBTree"
module=
"BTrees.OOBTree"
/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_acceptInvitation.py
0 → 100644
View file @
fbf0046a
project
=
state_change
[
'object'
]
portal
=
project
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
# Get required arguments
kwargs
=
state_change
.
kwargs
# Required args
# Raise TypeError if all parameters are not provided
try
:
token_id
=
kwargs
[
'invitation_token'
]
except
KeyError
:
raise
TypeError
(
"Project_acceptInvitation takes exactly 1 argument"
)
try
:
invitation_token
=
portal
.
invitation_token_module
[
token_id
]
except
KeyError
:
raise
ValueError
(
"The Invitation Token can't be found, please review the URL."
)
if
person
is
None
:
message_str
=
"Please login before access the invitation link."
raise
ValueError
(
message_str
)
if
invitation_token
.
getPortalType
()
!=
"Invitation Token"
:
message_str
=
"The Invitation Token can't be found, please review the URL."
raise
ValueError
(
message_str
)
if
invitation_token
.
getValidationState
()
!=
"validated"
:
message_str
=
"The Invitation Token was already used and it cannot be reused, please ask a new one."
raise
ValueError
(
message_str
)
if
invitation_token
.
getSourceValue
()
==
person
:
message_str
=
"Invitation Token cannot be used by the same user that generated the token!"
raise
ValueError
(
message_str
)
for
assignment
in
person
.
objectValues
(
portal_type
=
"Assignment"
):
if
assignment
.
getDestinationProject
()
==
project
.
getRelativeUrl
()
and
\
assignment
.
getValidationState
()
==
"open"
:
invitation_token
.
invalidate
(
comment
=
"User already has assignment to the Person"
)
break
if
invitation_token
.
getValidationState
()
==
"validated"
:
person
.
newContent
(
title
=
"Assigment for Project %s"
%
project
.
getTitle
(),
portal_type
=
"Assignment"
,
destination_project_value
=
project
).
open
()
invitation_token
.
invalidate
()
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_acceptInvitation.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Organisation_acceptInvitation
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Organisation_acceptInvitation
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_approveRegistration.py
0 → 100644
View file @
fbf0046a
project
=
state_change
[
"object"
]
from
DateTime
import
DateTime
portal
=
context
.
getPortalObject
()
if
project
.
getValidationState
()
!=
"draft"
:
return
if
project
.
getReference
()
in
[
None
,
""
]:
reference
=
"PROJ-%s"
%
portal
.
portal_ids
.
generateNewId
(
id_group
=
'slap_project_reference'
,
id_generator
=
'uid'
,
default
=
1
)
project
.
setReference
(
reference
)
# Get the user id of the context owner.
local_role_list
=
project
.
get_local_roles
()
for
group
,
role_list
in
local_role_list
:
if
'Owner'
in
role_list
:
user_id
=
group
break
person
=
portal
.
portal_catalog
.
getResultValue
(
user_id
=
user_id
)
if
person
is
None
:
# Value was created by super user, so there isn't a point on continue
return
for
assignment
in
person
.
objectValues
(
portal_type
=
"Assignment"
):
if
assignment
.
getDestinationProject
()
==
project
.
getRelativeUrl
():
if
assignment
.
getValidationState
()
!=
"open"
:
assignment
.
open
()
return
person
.
newContent
(
title
=
"Assigment for Project %s"
%
project
.
getTitle
(),
portal_type
=
"Assignment"
,
destination_project
=
project
.
getRelativeUrl
()).
open
()
project
.
edit
(
start_date
=
DateTime
())
project
.
validate
()
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_approveRegistration.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Organisation_approveRegistration
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Organisation_approveRegistration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_checkConsistency.py
0 → 100644
View file @
fbf0046a
organisation
=
state_change
[
'object'
]
organisation
.
Base_checkConsistency
()
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_checkConsistency.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Organisation_checkConsistency
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_generateInvitation.py
0 → 100644
View file @
fbf0046a
project
=
state_change
[
'object'
]
portal
=
context
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
request_method
=
"POST"
script_name
=
"Project_acceptInvitation"
web_site
=
context
.
getWebSiteValue
()
if
web_site
is
None
:
web_site
=
portal
request_url
=
"%s/%s/%s"
%
(
web_site
.
absolute_url
(),
project
.
getRelativeUrl
(),
script_name
)
# Maybe it would be better to use another portal_type
token
=
portal
.
invitation_token_module
.
newContent
(
portal_type
=
"Invitation Token"
,
source_value
=
person
,
url_string
=
request_url
,
url_method
=
request_method
)
token
.
validate
()
context
.
REQUEST
.
set
(
'request_token_id'
,
token
.
getId
())
context
.
REQUEST
.
set
(
'request_token_url_string'
,
request_url
)
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_generateInvitation.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Organisation_generateInvitation
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_leaveOrganisation.py
0 → 100644
View file @
fbf0046a
from
zExceptions
import
Unauthorized
organisation
=
state_change
[
'object'
]
portal
=
organisation
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
person
is
None
:
raise
Unauthorized
for
assignment
in
person
.
objectValues
(
portal_type
=
"Assignment"
):
if
assignment
.
getDestination
()
==
organisation
.
getRelativeUrl
():
assignment
.
close
()
break
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/script_Organisation_leaveOrganisation.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Script"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_Organisation_leaveOrganisation
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/state_draft.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow State"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
acquire_permission
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
destination/portal_workflow/organisation_slap_interface_workflow/transition_accept_invitation
</string>
<string>
destination/portal_workflow/organisation_slap_interface_workflow/transition_approve_registration
</string>
<string>
destination/portal_workflow/organisation_slap_interface_workflow/transition_leave_organisation
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
comment
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
state_draft
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow State
</string>
</value>
</item>
<item>
<key>
<string>
state_permission_role_list_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
state_type
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Draft
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
data
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/
project_slap_interface_workflow/transition_draft
.xml
→
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/
organisation_slap_interface_workflow/transition_accept_invitation
.xml
View file @
fbf0046a
...
...
@@ -23,7 +23,7 @@
<value>
<tuple>
<string>
action_type/workflow
</string>
<string>
destination/portal_workflow/project_slap_interface_workflow/state_draft
</string>
<string>
after_script/portal_workflow/organisation_slap_interface_workflow/script_Organisation_acceptInvitation
</string>
</tuple>
</value>
</item>
...
...
@@ -47,7 +47,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
transition_
draft
</string>
</value>
<value>
<string>
transition_
accept_invitation
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
...
...
@@ -55,7 +55,7 @@
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Draft
</string>
</value>
<value>
<string>
Accept Invitation
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/transition_approve_registration.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Transition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
action_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/workflow
</string>
<string>
before_script/portal_workflow/organisation_slap_interface_workflow/script_Organisation_checkConsistency
</string>
<string>
after_script/portal_workflow/organisation_slap_interface_workflow/script_Organisation_approveRegistration
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
guard_permission
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
transition_approve_registration
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Transition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Approve Registration
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/transition_leave_organisation.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Transition"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
action_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/workflow
</string>
<string>
before_script/portal_workflow/organisation_slap_interface_workflow/script_Organisation_checkConsistency
</string>
<string>
after_script/portal_workflow/organisation_slap_interface_workflow/script_Organisation_leaveOrganisation
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
guard_permission
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
transition_leave_organisation
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Transition
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Leave Organisation
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_action.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Variable"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
automatic_update
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The last transition
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variable_action
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Variable
</string>
</value>
</item>
<item>
<key>
<string>
status_included
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
variable_default_expression
</string>
</key>
<value>
<string>
transition/getReference|nothing
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_actor.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Variable"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
automatic_update
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The name of the user who performed the last transition
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variable_actor
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Variable
</string>
</value>
</item>
<item>
<key>
<string>
status_included
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
variable_default_expression
</string>
</key>
<value>
<string>
user/getUserName
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_comment.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Variable"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
automatic_update
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Comments about the last transition
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variable_comment
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Variable
</string>
</value>
</item>
<item>
<key>
<string>
status_included
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
variable_default_expression
</string>
</key>
<value>
<string>
python:state_change.kwargs.get(\'comment\', \'\')
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_error_message.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Variable"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
automatic_update
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Error message if validation failed
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variable_error_message
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Variable
</string>
</value>
</item>
<item>
<key>
<string>
status_included
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_history.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Variable"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
automatic_update
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Provides access to workflow history
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variable_history
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Variable
</string>
</value>
</item>
<item>
<key>
<string>
status_included
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
variable_default_expression
</string>
</key>
<value>
<string>
state_change/getHistory
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_portal_type.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Variable"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
automatic_update
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
portal type (use as filter for worklists)
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variable_portal_type
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Variable
</string>
</value>
</item>
<item>
<key>
<string>
status_included
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/organisation_slap_interface_workflow/variable_time.xml
0 → 100644
View file @
fbf0046a
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Workflow Variable"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
automatic_update
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
Time of the last transition
</string>
</value>
</item>
<item>
<key>
<string>
for_catalog
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
variable_time
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Variable
</string>
</value>
</item>
<item>
<key>
<string>
status_included
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
variable_default_expression
</string>
</key>
<value>
<string>
state_change/getDateTime
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/bt/template_portal_type_workflow_chain_list
View file @
fbf0046a
...
...
@@ -5,6 +5,7 @@ Hosting Subscription | edit_workflow
Instance Tree | edit_workflow
Instance Tree | instance_slap_interface_workflow
Instance Tree | instance_tree_workflow
Organisation | organisation_slap_interface_workflow
Person | person_slap_interface_workflow
Project | project_slap_interface_workflow
Slave Instance | edit_workflow
...
...
master/bt5/slapos_cloud/bt/template_workflow_id_list
View file @
fbf0046a
...
...
@@ -4,6 +4,7 @@ compute_partition_slap_interface_workflow
installation_slap_interface_workflow
instance_slap_interface_workflow
instance_tree_workflow
organisation_slap_interface_workflow
person_slap_interface_workflow
project_slap_interface_workflow
slapos_cloud_interaction_workflow
\ No newline at end of file
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Organisation_closeRelatedAssignment.py
View file @
fbf0046a
person
=
context
.
getPortalObject
().
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
for
assignment
in
person
.
objectValues
(
portal_type
=
"Assignment"
):
if
assignment
.
getDestination
()
==
context
.
getRelativeUrl
():
assignment
.
close
()
return
context
.
leaveOrganisation
()
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