Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
Commits
d03debfb
Commit
d03debfb
authored
Jun 16, 2011
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop getToolByName usage.
parent
953e369c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
product/ERP5/Tool/IntrospectionTool.py
product/ERP5/Tool/IntrospectionTool.py
+7
-5
No files found.
product/ERP5/Tool/IntrospectionTool.py
View file @
d03debfb
...
@@ -71,15 +71,16 @@ class IntrospectionTool(LogMixin, BaseTool):
...
@@ -71,15 +71,16 @@ class IntrospectionTool(LogMixin, BaseTool):
Returns menu items for a given user
Returns menu items for a given user
"""
"""
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
is_portal_manager
=
getToolByName
(
portal
,
is_portal_manager
=
portal
.
portal_membership
.
checkPermission
(
\
'portal_membership'
).
checkPermission
(
Permissions
.
ManagePortal
,
self
)
Permissions
.
ManagePortal
,
self
)
downgrade_authenticated_user
=
user_name
is
not
_MARKER
and
is_portal_manager
downgrade_authenticated_user
=
user_name
is
not
_MARKER
and
is_portal_manager
if
downgrade_authenticated_user
:
if
downgrade_authenticated_user
:
# downgrade to desired user
# downgrade to desired user
original_security_manager
=
_setSuperSecurityManager
(
self
,
user_name
)
original_security_manager
=
_setSuperSecurityManager
(
self
,
user_name
)
# call the method implementing it
# call the method implementing it
erp5_menu_dict
=
getToolByName
(
portal
,
'portal_actions'
)
.
listFilteredActionsFor
(
portal
)
erp5_menu_dict
=
portal
.
portal_actions
.
listFilteredActionsFor
(
portal
)
if
downgrade_authenticated_user
:
if
downgrade_authenticated_user
:
# restore original Security Manager
# restore original Security Manager
...
@@ -99,8 +100,9 @@ class IntrospectionTool(LogMixin, BaseTool):
...
@@ -99,8 +100,9 @@ class IntrospectionTool(LogMixin, BaseTool):
Returns module items for a given user
Returns module items for a given user
"""
"""
portal
=
self
.
getPortalObject
()
portal
=
self
.
getPortalObject
()
is_portal_manager
=
getToolByName
(
portal
,
is_portal_manager
=
portal
.
portal_membership
.
checkPermission
(
'portal_membership'
).
checkPermission
(
Permissions
.
ManagePortal
,
self
)
Permissions
.
ManagePortal
,
self
)
downgrade_authenticated_user
=
user_name
is
not
_MARKER
and
is_portal_manager
downgrade_authenticated_user
=
user_name
is
not
_MARKER
and
is_portal_manager
if
downgrade_authenticated_user
:
if
downgrade_authenticated_user
:
# downgrade to desired user
# downgrade to desired user
...
...
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