Commit 601ca5c2 authored by Ivan Tyagov's avatar Ivan Tyagov

Minor change in API.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25672 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 87c095ea
...@@ -59,13 +59,13 @@ class IntrospectionTool(BaseTool, LogMixIn): ...@@ -59,13 +59,13 @@ class IntrospectionTool(BaseTool, LogMixIn):
Returns menu items for a given user Returns menu items for a given user
""" """
portal = self.getPortalObject() portal = self.getPortalObject()
user_name = kw.pop('user_name', None) erp5_user_name = kw.pop('erp5_user_name', None)
is_portal_manager = portal.portal_membership.checkPermission(Permissions.ManagePortal, \ is_portal_manager = portal.portal_membership.checkPermission(Permissions.ManagePortal, \
portal) portal)
downgrade_authenticated_user = user_name is not None and is_portal_manager downgrade_authenticated_user = erp5_user_name is not None 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, erp5_user_name)
# call the method implementing it # call the method implementing it
erp5_menu_item_list = self._getTypeBasedMethod('getERP5MenuItemList', erp5_menu_item_list = self._getTypeBasedMethod('getERP5MenuItemList',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment