[CMF-checkins] CVS: CMF/CMFCore - MembershipTool.py:1.42
Yvo Schubbe
schubbe at web.de
Mon Oct 20 05:40:30 EDT 2003
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv19564/CMFCore
Modified Files:
MembershipTool.py
Log Message:
only Managers should be able to assign the Local Role 'Manager'
=== CMF/CMFCore/MembershipTool.py 1.41 => 1.42 ===
--- CMF/CMFCore/MembershipTool.py:1.41 Mon Sep 29 07:19:38 2003
+++ CMF/CMFCore/MembershipTool.py Mon Oct 20 05:39:59 2003
@@ -393,10 +393,13 @@
""" What local roles can I assign?
"""
member = self.getAuthenticatedMember()
+ member_roles = member.getRolesInContext(obj)
if _checkPermission(ManageUsers, obj):
local_roles = self.getPortalRoles()
+ if 'Manager' not in member_roles:
+ local_roles.remove('Manager')
else:
- local_roles = [ role for role in member.getRolesInContext(obj)
+ local_roles = [ role for role in member_roles
if role not in ('Member', 'Authenticated') ]
local_roles.sort()
return tuple(local_roles)
More information about the CMF-checkins
mailing list