20 Apr
2005
20 Apr
'05
2:37 p.m.
--On Mittwoch, 20. April 2005 16:30 Uhr +0200 BonviciniJ@keops.net wrote:
I have problem with my python script. I want to check if a user has a the "manager" role, and add an option in a menu in this case Here is my script:
for el in rep.objectValues('Folder'): if el.id=="Administration" and AUTHENTICATED_USER.has_role(self, ["Manager"]): #add option to the menu
The recommended way to determine the current user is: from AccessControl import getSecurityManager() user = getSecurityManager().getUser() -aj