[Zope-CMF] A role to assign local roles.

Luca Olivetti luca@wetron.es
Mon, 25 Mar 2002 10:34:33 +0100


I would like a role (say, 'Human Resources') to assign local roles to other users.
Since the machinery is already in place (through folder_localrole_form) I thought I 
could use it.
The problem is that in MembershipTool.py (methods getCandidateLocalRoles and 
setLocalRoles) the user is restricted to assign roles she already has unless she is 
'Manager'.
I don't want these users to be 'Manager' (to avoid them making collateral damage to the 
portal ;-) but I don't want them to have all roles they are to assign either.
I could hack these two methods to accept this role as well as manager (not general 
enough), or to check for a specifical permission ('Manage users' comes to mind) but I 
don't feel this is a good solution, for at least it could be overwritten next time I 
upgrade CMFCore.
Any hint?

TIA
-- 
Luca Olivetti
Wetron Automatización S.A. http://www.wetron.es/
Tel. +34 93 5883004      Fax +34 93 5883007