Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin
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
Ivan Tyagov
wendelin
Commits
cc4511bf
Commit
cc4511bf
authored
Sep 30, 2019
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update local roles if defined on custom built business template.
parent
ee548a12
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
bt5/erp5_wendelin_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wendelin/BusinessConfiguration_afterWendelinConfiguration.py
...delin/BusinessConfiguration_afterWendelinConfiguration.py
+17
-2
No files found.
bt5/erp5_wendelin_configurator/SkinTemplateItem/portal_skins/erp5_configurator_wendelin/BusinessConfiguration_afterWendelinConfiguration.py
View file @
cc4511bf
"""
This script will be called to apply the customization.
"""
from
Products.ERP5Type.Log
import
log
# Activate the knowledge pads on portal home to enable later the Wendelin
# Information gadget.
#
configuration
=
self
.
portal
.
portal_preferences
.
getActivePreference
()
portal
=
context
.
getPortalObject
()
configuration
=
portal
.
portal_preferences
.
getActivePreference
()
configuration
.
setPreferredHtmlStyleAccessTab
(
True
)
# updata local roles (if any)
business_template
=
context
.
getSpecialiseValue
()
if
business_template
is
not
None
:
# update role settings for modules which exists already
for
portal_type
in
business_template
.
getTemplatePortalTypeRoleList
():
module_list
=
portal
.
contentValues
(
filter
=
dict
(
portal_type
=
portal_type
))
for
module
in
module_list
:
module
.
updateLocalRolesOnSecurityGroups
()
print
"Updated Role Mappings for: %s(%s) "
%
(
module
.
getTitle
(),
module
.
getPortalType
())
log
(
"%s"
%
printed
)
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