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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
90524d25
Commit
90524d25
authored
Mar 04, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Plain Diff
erp5_forge: Add action to update whole site Local Roles
See merge request
!1895
parents
ca84619d
7b1855d4
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
158 additions
and
0 deletions
+158
-0
bt5/erp5_forge/ActionTemplateItem/portal_types/Types%20Tool/update_all_local_role.xml
...eItem/portal_types/Types%20Tool/update_all_local_role.xml
+85
-0
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/TypesTool_updateAllLocalRolesOnSecurityGroup.py
...5_toolbox/TypesTool_updateAllLocalRolesOnSecurityGroup.py
+10
-0
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/TypesTool_updateAllLocalRolesOnSecurityGroup.xml
..._toolbox/TypesTool_updateAllLocalRolesOnSecurityGroup.xml
+62
-0
bt5/erp5_forge/bt/template_action_path_list
bt5/erp5_forge/bt/template_action_path_list
+1
-0
No files found.
bt5/erp5_forge/ActionTemplateItem/portal_types/Types%20Tool/update_all_local_role.xml
0 → 100644
View file @
90524d25
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_jio_action
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_jio_action
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
update_all_local_role
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
3.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Update All Local Roles
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/TypesTool_updateAllLocalRolesOnSecurityGroup
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/TypesTool_updateAllLocalRolesOnSecurityGroup.py
0 → 100644
View file @
90524d25
portal
=
context
.
getPortalObject
()
type_list
=
[]
for
erp5_type
in
portal
.
portal_catalog
(
children_portal_type
=
"Role Information"
,
portal_type
=
portal
.
portal_types
[
"Types Tool"
].
getTypeAllowedContentTypeList
()):
type_list
.
append
(
erp5_type
.
getId
())
erp5_type
.
getObject
().
updateRoleMapping
(
priority
=
4
)
return
context
.
Base_redirect
(
'view'
,
keep_items
=
{
"portal_status_message"
:
"Updated Role Mapping on for all portal types with Roles"
})
bt5/erp5_forge/SkinTemplateItem/portal_skins/erp5_toolbox/TypesTool_updateAllLocalRolesOnSecurityGroup.xml
0 → 100644
View file @
90524d25
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"_reconstructor"
module=
"copy_reg"
/>
</klass>
<tuple>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
<global
name=
"object"
module=
"__builtin__"
/>
<none/>
</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></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
TypesTool_updateAllLocalRolesOnSecurityGroup
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_forge/bt/template_action_path_list
View file @
90524d25
...
...
@@ -43,4 +43,5 @@ Template Tool | bt_vcs_history
Template Tool | migrate_business_template_list
Template Tool | search_portal_type
Types Tool | role_information_list_view
Types Tool | update_all_local_role
portal_actions | generate_pot_file
\ No newline at end of file
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