[Zope-CMF] Re: CMF 1.4.2 released

Yuppie schubbe at web.de
Wed Oct 29 03:33:36 EST 2003


Hi!


Andreas Heckel wrote:
> I made a change to this method to allow a user with a locally assigned
> Manager role to delegate all protal roles at this context too.
> 
>     def getCandidateLocalRoles(self, obj):
>         """ What local roles can I assign?
>         """
>         member = self.getAuthenticatedMember()
>         if 'Manager' in member.getRoles():
>             local_roles = self.getPortalRoles()
>         else:
>             roles = [ role for role in member.getRolesInContext(obj)
>                             if role not in ('Member', 'Authenticated') ]
>             if 'Manager' not in roles:
> 		local_roles=roles
> 	    else:
>                 local_roles = self.getPortalRoles()
>         local_roles.sort()
>         return tuple(local_roles)
> 
> My question is ... is that risky ?

Changing getCandidateLocalRoles() isn't risky at all in CMF 1.4.2 (as 
long as it doesn't do anything but returning a tuple of roles). The only 
place this method is used is folder_localrole_form. If you want return 
self.getPortalRoles() for everybody. People will see some error 
messages, but that's it.

In CMF 1.5 this will be different. If you look at CMF HEAD, 
setLocalRoles() depends on getCandidateLocalRoles(). And 
getCandidateLocalRoles() has a change similar to your change.

CMF 1.5 will also use 'Manage users' and 'Change local roles' 
permissions to control the behavior.

> Tres Seaver wrote:
> 
>>This release consists primarily of bug fixes for version 1.3,

Copy and paste is risky. CMF 1.4.2 consists primarily of CMF 1.4.1 ;)


Cheers,
	Yuppie








More information about the Zope-CMF mailing list