• Remember Mailing List

Re: Member groups and roles

from Rob Miller on Aug 14, 2006 06:45 PM
Rob Miller wrote:
> Rob Miller wrote:
>> On 2006-08-01 17:16, Clayton Parker wrote:
>>> 2) When you edit a member and add one of the stock groups it doesn't 
>>> get assigned to the user.  So if you select 'Administrators' and try 
>>> member.getUser().getGroups() you receive an empty list.  On the other 
>>> hand if you add a 'SimpleGroup' from membrane and add the member to 
>>> the references of that group then the user receives group and the 
>>> roles assigned to that group.  I can't figure out where to glue the 
>>> stock groups and remember together.  Any ideas here?  My guess is it 
>>> has something to do with getGroupsForPrincipal() but that has not led 
>>> me to the answer.
>>
>> hmm... i'd think it would be handled at the PAS layer, cascading down 
>> from one
>> plug-in to another depending on priority.  maybe not, though, i'll take a
>> look. 
> 
> whoops, i was misunderstanding.  this is our problem, it's not related 
> to the other plug-ins at all.  i'll work on it.
> 
> it's worth noting that this is the PERFECT problem for writing a test.  
> i was able to write a 6 line test that demonstrated this problem exists, 
> which will make the process of fixing the problem much more pleasant.  
> plus, the test will persist long after the bug is fixed, so we'll know 
> if this ever breaks again.

okay, this is fixed and committed.  i defined and registered a new groups 
adapter that will take precedence over the default one from membrane.  this 
adapter just uses the getRoles method on the member object to get the roles, 
rather than using references to group objects like the default adapter.

and the test passes.  :-).

-r


> 
> -r
> 

Return to date view: threaded or flat