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
Léo-Paul Géneau
slapos.core
Commits
9013c2c9
Commit
9013c2c9
authored
Dec 10, 2021
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_cloud&jio&erp5: Introduce Person.requestNetwork
parent
e3d83856
Changes
30
Show whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
842 additions
and
184 deletions
+842
-184
master/bt5/slapos_cloud/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputerNetwork_init.py
...ateItem/portal_skins/slapos_cloud/ComputerNetwork_init.py
+0
-7
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow.xml
...eItem/portal_workflow/network_slap_interface_workflow.xml
+102
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_approveRegistration.py
...ce_workflow/script_ComputerNetwork_approveRegistration.py
+13
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_approveRegistration.xml
...e_workflow/script_ComputerNetwork_approveRegistration.xml
+12
-21
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_checkConsistency.py
...rface_workflow/script_ComputerNetwork_checkConsistency.py
+2
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_checkConsistency.xml
...face_workflow/script_ComputerNetwork_checkConsistency.xml
+4
-6
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/state_draft.xml
..._workflow/network_slap_interface_workflow/state_draft.xml
+77
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/transition_approve_registration.xml
...ap_interface_workflow/transition_approve_registration.xml
+26
-26
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_action.xml
...kflow/network_slap_interface_workflow/variable_action.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_actor.xml
...rkflow/network_slap_interface_workflow/variable_actor.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_comment.xml
...flow/network_slap_interface_workflow/variable_comment.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_error_message.xml
...etwork_slap_interface_workflow/variable_error_message.xml
+42
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_history.xml
...flow/network_slap_interface_workflow/variable_history.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_portal_type.xml
.../network_slap_interface_workflow/variable_portal_type.xml
+42
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_time.xml
...orkflow/network_slap_interface_workflow/variable_time.xml
+46
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestNetwork.py
...n_slap_interface_workflow/script_Person_requestNetwork.py
+43
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestNetwork.xml
..._slap_interface_workflow/script_Person_requestNetwork.xml
+76
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/state_draft.xml
...l_workflow/person_slap_interface_workflow/state_draft.xml
+1
-0
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/transition_request_network.xml
...on_slap_interface_workflow/transition_request_network.xml
+68
-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_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+1
-1
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
...components/test.erp5.testSlapOSERP5InteractionWorkflow.py
+1
-78
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/slapos_erp5_interaction_workflow/script_ComputerNetwork_validate.py
...5_interaction_workflow/script_ComputerNetwork_validate.py
+0
-12
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
...5/slapos_erp5/bt/template_portal_type_workflow_chain_list
+0
-2
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_network_js.js
...b_page_module/rjs_gadget_erp5_page_slap_add_network_js.js
+13
-29
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_network_js.xml
..._page_module/rjs_gadget_erp5_page_slap_add_network_js.xml
+2
-2
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestNetwork.py
...rtal_skins/slapos_hal_json_style/Person_requestNetwork.py
+19
-0
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestNetwork.xml
...tal_skins/slapos_hal_json_style/Person_requestNetwork.xml
+62
-0
No files found.
master/bt5/slapos_cloud/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
9013c2c9
...
...
@@ -7,6 +7,10 @@
<type>
Compute Partition
</type>
<workflow>
compute_partition_slap_interface_workflow
</workflow>
</chain>
<chain>
<type>
Computer Network
</type>
<workflow>
computer_network_slap_interface_workflow
</workflow>
</chain>
<chain>
<type>
Hosting Subscription
</type>
<workflow>
edit_workflow
</workflow>
...
...
master/bt5/slapos_cloud/SkinTemplateItem/portal_skins/slapos_cloud/ComputerNetwork_init.py
deleted
100644 → 0
View file @
e3d83856
portal
=
context
.
getPortalObject
()
reference
=
"NET-%s"
%
portal
.
portal_ids
.
generateNewId
(
id_group
=
'slap_network_reference'
,
id_generator
=
'uid'
)
context
.
edit
(
reference
=
reference
)
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/state_draft
</string>
</tuple>
</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>
network_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>
Network 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/network_slap_interface_workflow/script_ComputerNetwork_approveRegistration.py
0 → 100644
View file @
9013c2c9
computer_network
=
state_change
[
"object"
]
from
DateTime
import
DateTime
portal
=
computer_network
.
getPortalObject
()
if
computer_network
.
getReference
()
in
[
None
,
""
]:
reference
=
"NET-%s"
%
portal
.
portal_ids
.
generateNewId
(
id_group
=
'slap_network_reference'
,
id_generator
=
'uid'
)
computer_network
.
setReference
(
reference
)
computer_network
.
validate
()
master/bt5/slapos_cloud/
SkinTemplateItem/portal_skins/slapos_cloud/ComputerNetwork_init
.xml
→
master/bt5/slapos_cloud/
WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_approveRegistration
.xml
View file @
9013c2c9
...
...
@@ -2,7 +2,7 @@
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"
PythonScript"
module=
"Products.PythonScripts.PythonScript
"
/>
<global
name=
"
Workflow Script"
module=
"erp5.portal_type
"
/>
</pickle>
<pickle>
<dictionary>
...
...
@@ -50,42 +50,33 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
**kw
</string>
</value>
<value>
<string>
state_change
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<value>
<tuple>
<string>
Own
er
</string>
<string>
Manag
er
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
guard
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<
persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent
>
<
none/
>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ComputerNetwork_init
</string>
</value>
<value>
<string>
script_ComputerNetwork_approveRegistration
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Guard"
module=
"Products.DCWorkflow.Guard"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
roles
</string>
</key>
<value>
<tuple
>
<string>
Owner
</string
>
</tuple
>
</value>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Workflow Script
</string>
</value>
</item
>
<item
>
<key>
<string>
title
</string>
</key
>
<
value>
<string>
ComputerNetwork_approveRegistration
</string>
<
/value>
</item>
</dictionary>
</pickle>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_checkConsistency.py
0 → 100644
View file @
9013c2c9
computer_network
=
state_change
[
'object'
]
computer_network
.
Base_checkConsistency
()
master/bt5/slapos_
erp5/WorkflowTemplateItem/portal_workflow/slapos_erp5_interaction_workflow/script_ComputerNetwork_validate
.xml
→
master/bt5/slapos_
cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_checkConsistency
.xml
View file @
9013c2c9
...
...
@@ -50,19 +50,17 @@
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
state_
object
</string>
</value>
<value>
<string>
state_
change
</string>
</value>
</item>
<item>
<key>
<string>
_proxy_roles
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<tuple>
<string>
Manager
</string>
</tuple>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
script_ComputerNetwork_
validate
</string>
</value>
<value>
<string>
script_ComputerNetwork_
checkConsistency
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/state_draft.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/transition_approve_registration
</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_
erp5/WorkflowTemplateItem/portal_workflow/slapos_erp5_interaction_workflow/interaction_ComputerNetwork_setRefence
.xml
→
master/bt5/slapos_
cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/transition_approve_registration
.xml
View file @
9013c2c9
...
...
@@ -2,61 +2,61 @@
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"
Interaction Workflow Interac
tion"
module=
"erp5.portal_type"
/>
<global
name=
"
Workflow Transi
tion"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
categories
</string>
</key>
<key>
<string>
action
</string>
</key>
<value>
<tuple>
<string>
before_commit_script/portal_workflow/slapos_erp5_interaction_workflow/script_ComputerNetwork_validate
</string>
</tuple>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<key>
<string>
action_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
interaction_ComputerNetwork_setRefence
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Interaction Workflow Interaction
</string>
</value>
</item>
<item>
<key>
<string>
portal_type_filter
</string>
</key>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
Computer Network
</string>
<string>
action_type/workflow
</string>
<string>
before_script/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_checkConsistency
</string>
<string>
after_script/portal_workflow/network_slap_interface_workflow/script_ComputerNetwork_approveRegistration
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type_group_filter
</string>
</key>
<key>
<string>
description
</string>
</key>
<value>
<
tupl
e/>
<
non
e/>
</value>
</item>
<item>
<key>
<string>
temporary_document_disallowed
</string>
</key>
<value>
<int>
0
</int>
</value>
<key>
<string>
guard_permission
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
trigger_method_id
</string>
</key>
<key>
<string>
icon
</string>
</key>
<value>
<tuple>
<string>
_setReference*
</string>
</tuple>
<none/>
</value>
</item>
<item>
<key>
<string>
trigger_once_per_transaction
</string>
</key>
<value>
<int>
0
</int>
</value>
<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>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/network_slap_interface_workflow/variable_action.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/variable_actor.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/variable_comment.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/variable_error_message.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/variable_history.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/variable_portal_type.xml
0 → 100644
View file @
9013c2c9
<?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/network_slap_interface_workflow/variable_time.xml
0 → 100644
View file @
9013c2c9
<?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/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestNetwork.py
0 → 100644
View file @
9013c2c9
person
=
state_change
[
'object'
]
portal
=
person
.
getPortalObject
()
# Get required arguments
kwargs
=
state_change
.
kwargs
# Required args
# Raise TypeError if all parameters are not provided
try
:
computer_network_title
=
kwargs
[
'network_title'
]
except
KeyError
:
raise
TypeError
,
"Person_requestNetwork takes exactly 1 argument"
tag
=
"%s_%s_NetworkInProgress"
%
(
person
.
getUid
(),
computer_network_title
)
if
(
portal
.
portal_activities
.
countMessageWithTag
(
tag
)
>
0
):
# The software instance is already under creation but can not be fetched from catalog
# As it is not possible to fetch informations, it is better to raise an error
raise
NotImplementedError
(
tag
)
computer_network_portal_type
=
"Computer Network"
computer_network_list
=
portal
.
portal_catalog
.
portal_catalog
(
portal_type
=
computer_network_portal_type
,
title
=
computer_network_title
,
validation_state
=
"validated"
,
limit
=
2
)
if
len
(
computer_network_list
)
==
2
:
raise
NotImplementedError
elif
len
(
computer_network_list
)
==
1
:
context
.
REQUEST
.
set
(
"computer_network_relative_url"
,
computer_network_list
[
0
].
getRelativeUrl
())
context
.
REQUEST
.
set
(
"computer_network_reference"
,
computer_network_list
[
0
].
getReference
())
else
:
module
=
portal
.
getDefaultModule
(
portal_type
=
computer_network_portal_type
)
computer_network
=
module
.
newContent
(
portal_type
=
computer_network_portal_type
,
title
=
computer_network_title
,
source_administration
=
person
.
getRelativeUrl
(),
activate_kw
=
{
'tag'
:
tag
}
)
context
.
REQUEST
.
set
(
"computer_network_relative_url"
,
computer_network
.
getRelativeUrl
())
context
.
REQUEST
.
set
(
"computer_network_reference"
,
computer_network
.
getReference
())
computer_network
.
approveRegistration
()
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/script_Person_requestNetwork.xml
0 → 100644
View file @
9013c2c9
<?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_Person_requestNetwork
</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>
Person_requestNetwork
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/state_draft.xml
View file @
9013c2c9
...
...
@@ -16,6 +16,7 @@
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_network
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_compute_node
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_organisation
</string>
<string>
destination/portal_workflow/person_slap_interface_workflow/transition_request_project
</string>
...
...
master/bt5/slapos_cloud/WorkflowTemplateItem/portal_workflow/person_slap_interface_workflow/transition_request_network.xml
0 → 100644
View file @
9013c2c9
<?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/person_slap_interface_workflow/script_Person_checkConsistency
</string>
<string>
after_script/portal_workflow/person_slap_interface_workflow/script_Person_requestNetwork
</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_request_network
</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>
Request Network
</string>
</value>
</item>
<item>
<key>
<string>
trigger_type
</string>
</key>
<value>
<int>
2
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
master/bt5/slapos_cloud/bt/template_portal_type_workflow_chain_list
View file @
9013c2c9
Compute Node | compute_node_slap_interface_workflow
Compute Node | slapos_cloud_interaction_workflow
Compute Partition | compute_partition_slap_interface_workflow
Computer Network | computer_network_slap_interface_workflow
Hosting Subscription | edit_workflow
Instance Tree | edit_workflow
Instance Tree | instance_slap_interface_workflow
...
...
master/bt5/slapos_cloud/bt/template_workflow_id_list
View file @
9013c2c9
...
...
@@ -4,6 +4,7 @@ compute_partition_slap_interface_workflow
installation_slap_interface_workflow
instance_slap_interface_workflow
instance_tree_workflow
network_slap_interface_workflow
organisation_slap_interface_workflow
person_slap_interface_workflow
project_slap_interface_workflow
...
...
master/bt5/slapos_erp5/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
9013c2c9
...
...
@@ -17,7 +17,7 @@
</chain>
<chain>
<type>
Computer Network
</type>
<workflow>
local_permission_slapos_interaction_workflow
, slapos_erp5_interaction_workflow
</workflow>
<workflow>
local_permission_slapos_interaction_workflow
</workflow>
</chain>
<chain>
<type>
Contract Invitation Token
</type>
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSERP5InteractionWorkflow.py
View file @
9013c2c9
...
...
@@ -252,80 +252,3 @@ class TestSlapOSERP5InteractionWorkflowComputeNodeSetAllocationScope(
self
.
assertEqual
(
compute_node
.
getSubjectList
(),
[
person
.
getDefaultEmailCoordinateText
()])
self
.
assertEqual
(
compute_node
.
getDestinationSectionList
(),
[
person
.
getRelativeUrl
()])
\ No newline at end of file
class
TestSlapOSERP5InteractionWorkflowComputerNetworkSetReference
(
SlapOSTestCaseMixin
):
def
test_ComputerNetwork_validate
(
self
):
computer_network
=
self
.
portal
.
computer_network_module
.
newContent
(
portal_type
=
"Computer Network"
)
self
.
commit
()
self
.
assertNotEqual
(
computer_network
.
getReference
(),
None
)
self
.
assertEqual
(
computer_network
.
getValidationState
(),
"validated"
)
self
.
assertEqual
(
computer_network
.
getSourceAdministration
(),
None
)
@
simulate
(
"ComputerNetwork_init"
,
"*args, **kwargs"
,
"return"
)
def
test_ComputerNetwork_validate_manual
(
self
):
computer_network
=
self
.
portal
.
computer_network_module
.
newContent
(
portal_type
=
"Computer Network"
)
self
.
commit
()
self
.
assertEqual
(
computer_network
.
getReference
(),
None
)
self
.
assertEqual
(
computer_network
.
getValidationState
(),
"draft"
)
self
.
assertEqual
(
computer_network
.
getSourceAdministration
(),
None
)
computer_network
.
setReference
(
"COMPNTEST-%s"
%
self
.
new_id
)
self
.
tic
()
self
.
assertNotEqual
(
computer_network
.
getReference
(),
None
)
self
.
assertEqual
(
computer_network
.
getValidationState
(),
"validated"
)
self
.
assertEqual
(
computer_network
.
getSourceAdministration
(),
None
)
@
simulate
(
"ComputerNetwork_init"
,
"*args, **kwargs"
,
"return"
)
def
test_ComputerNetwork_validate_manual_with_user
(
self
):
person
=
self
.
makePerson
(
user
=
True
)
self
.
login
(
person
.
getUserId
())
computer_network
=
self
.
portal
.
computer_network_module
.
newContent
(
portal_type
=
"Computer Network"
)
self
.
commit
()
self
.
assertEqual
(
computer_network
.
getReference
(),
None
)
self
.
assertEqual
(
computer_network
.
getValidationState
(),
"draft"
)
self
.
assertEqual
(
computer_network
.
getSourceAdministration
(),
None
)
computer_network
.
setReference
(
"COMPNTEST-%s"
%
self
.
new_id
)
self
.
tic
()
self
.
assertNotEqual
(
computer_network
.
getReference
(),
None
)
self
.
assertEqual
(
computer_network
.
getValidationState
(),
"validated"
)
self
.
assertEqual
(
computer_network
.
getSourceAdministration
(),
person
.
getRelativeUrl
())
@
simulate
(
"ComputerNetwork_init"
,
"*args, **kwargs"
,
"return"
)
def
test_ComputerNetwork_validate_manual_already_validated
(
self
):
person
=
self
.
makePerson
(
user
=
True
)
self
.
login
(
person
.
getUserId
())
computer_network
=
self
.
portal
.
computer_network_module
.
newContent
(
portal_type
=
"Computer Network"
)
computer_network
.
validate
()
self
.
commit
()
self
.
assertEqual
(
computer_network
.
getReference
(),
None
)
self
.
assertEqual
(
computer_network
.
getValidationState
(),
"validated"
)
self
.
assertEqual
(
computer_network
.
getSourceAdministration
(),
None
)
computer_network
.
setReference
(
"COMPNTEST-%s"
%
self
.
new_id
)
self
.
tic
()
self
.
assertNotEqual
(
computer_network
.
getReference
(),
None
)
self
.
assertEqual
(
computer_network
.
getValidationState
(),
"validated"
)
self
.
assertEqual
(
computer_network
.
getSourceAdministration
(),
None
)
\ No newline at end of file
master/bt5/slapos_erp5/WorkflowTemplateItem/portal_workflow/slapos_erp5_interaction_workflow/script_ComputerNetwork_validate.py
deleted
100644 → 0
View file @
e3d83856
computer_network
=
state_object
[
"object"
]
portal
=
context
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
if
person
is
not
None
and
computer_network
.
getValidationState
()
==
"draft"
:
computer_network
.
edit
(
source_administration
=
person
.
getRelativeUrl
()
)
if
computer_network
.
getValidationState
()
==
"draft"
:
computer_network
.
validate
()
master/bt5/slapos_erp5/bt/template_portal_type_workflow_chain_list
View file @
9013c2c9
...
...
@@ -4,7 +4,6 @@ Compute Node | local_permission_slapos_interaction_workflow
Compute Node | slapos_erp5_interaction_workflow
Computer Model | local_permission_slapos_interaction_workflow
Computer Network | local_permission_slapos_interaction_workflow
Computer Network | slapos_erp5_interaction_workflow
Contract Invitation Token | edit_workflow
Contract Invitation Token | validation_workflow
Delivery Cell | -immobilisation_movement_interaction_workflow
...
...
@@ -19,7 +18,6 @@ Inventory | -immobilisation_movement_interaction_workflow
Invitation Token | edit_workflow
Invitation Token | validation_workflow
Organisation | local_permission_slapos_interaction_workflow
Organisation | slapos_erp5_interaction_workflow
Payment Transaction | local_permission_slapos_interaction_workflow
Payzen Event | local_permission_slapos_interaction_workflow
Person | local_permission_slapos_interaction_workflow
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_network_js.js
View file @
9013c2c9
...
...
@@ -12,7 +12,7 @@
.
declareAcquiredMethod
(
"
getSetting
"
,
"
getSetting
"
)
.
declareAcquiredMethod
(
"
getUrlFor
"
,
"
getUrlFor
"
)
.
declareAcquiredMethod
(
"
redirect
"
,
"
redirect
"
)
.
declareAcquiredMethod
(
"
jio_
post
"
,
"
jio_pos
t
"
)
.
declareAcquiredMethod
(
"
jio_
getAttachment
"
,
"
jio_getAttachmen
t
"
)
.
declareAcquiredMethod
(
"
notifySubmitting
"
,
"
notifySubmitting
"
)
.
declareAcquiredMethod
(
"
notifySubmitted
"
,
'
notifySubmitted
'
)
.
declareAcquiredMethod
(
"
getTranslationList
"
,
"
getTranslationList
"
)
...
...
@@ -31,17 +31,23 @@
return
gadget
.
getDeclaredGadget
(
'
form_view
'
);
})
.
push
(
function
(
form_gadget
)
{
return
form_gadget
.
getContent
();
return
RSVP
.
all
([
form_gadget
.
getContent
(),
gadget
.
getSetting
(
'
me
'
)]);
})
.
push
(
function
(
doc
)
{
return
gadget
.
jio_post
(
doc
);
.
push
(
function
(
result
)
{
var
doc
=
result
[
0
],
me
=
result
[
1
];
return
gadget
.
getSetting
(
"
hateoas_url
"
)
.
push
(
function
(
url
)
{
return
gadget
.
jio_getAttachment
(
me
,
url
+
me
+
"
/Person_requestNetwork?title=
"
+
doc
.
title
);
});
})
.
push
(
function
(
key
)
{
.
push
(
function
(
result
)
{
return
gadget
.
notifySubmitted
({
message
:
gadget
.
message_translation
,
status
:
'
success
'
})
.
push
(
function
()
{
// Workaround, find a way to open document without break gadget.
return
gadget
.
redirect
({
"
command
"
:
"
change
"
,
"
options
"
:
{
"
jio_key
"
:
key
,
"
page
"
:
"
slap_controller
"
}});
"
options
"
:
{
"
jio_key
"
:
result
.
relative_url
,
"
page
"
:
"
slap_controller
"
}});
});
});
})
...
...
@@ -83,28 +89,6 @@
"
key
"
:
"
title
"
,
"
hidden
"
:
0
,
"
type
"
:
"
StringField
"
},
"
my_portal_type
"
:
{
"
description
"
:
"
The name of a document in ERP5
"
,
"
title
"
:
result
[
1
][
1
],
"
default
"
:
"
Computer Network
"
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
portal_type
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
},
"
my_parent_relative_url
"
:
{
"
description
"
:
""
,
"
title
"
:
result
[
1
][
2
],
"
default
"
:
"
computer_network_module
"
,
"
css_class
"
:
""
,
"
required
"
:
1
,
"
editable
"
:
1
,
"
key
"
:
"
parent_relative_url
"
,
"
hidden
"
:
1
,
"
type
"
:
"
StringField
"
}
}},
"
_links
"
:
{
...
...
@@ -117,7 +101,7 @@
form_definition
:
{
group_list
:
[[
"
left
"
,
[[
"
my_title
"
]
,
[
"
my_portal_type
"
],
[
"
my_parent_relative_url
"
]
]
[[
"
my_title
"
]]
]]
}
});
...
...
master/bt5/slapos_jio/PathTemplateItem/web_page_module/rjs_gadget_erp5_page_slap_add_network_js.xml
View file @
9013c2c9
...
...
@@ -279,7 +279,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
87.11840.22638.11383
</string>
</value>
<value>
<string>
9
96.48626.19826.13090
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -297,7 +297,7 @@
</tuple>
<state>
<tuple>
<float>
16
02261150.2
8
</float>
<float>
16
39166593.
8
</float>
<string>
UTC
</string>
</tuple>
</state>
...
...
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestNetwork.py
0 → 100644
View file @
9013c2c9
import
json
portal
=
context
.
getPortalObject
()
person
=
portal
.
portal_membership
.
getAuthenticatedMember
().
getUserValue
()
request
=
context
.
REQUEST
response
=
request
.
RESPONSE
if
person
is
None
:
response
.
setStatus
(
403
)
else
:
request_kw
=
dict
(
network_title
=
title
)
person
.
requestNetwork
(
**
request_kw
)
network_relative_url
=
context
.
REQUEST
.
get
(
'computer_network_relative_url'
)
network_reference
=
context
.
REQUEST
.
get
(
'computer_network_reference'
)
return
json
.
dumps
({
"reference"
:
network_reference
,
"relative_url"
:
network_relative_url
})
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Person_requestNetwork.xml
0 → 100644
View file @
9013c2c9
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</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>
title
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Person_requestNetwork
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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