• Remember Mailing List

Member groups and roles

from Clayton Parker on Aug 01, 2006 05:16 PM
Rob,

I have checked in the test for the member along with a few other changes 
to remember.  There are a few questions that I have for you.

1) In order to get the roles working i needed to implement 
IGroupsProvider and IGroupAwareRolesProvider.  This then looked at 
getRoles to return the proper roles for the member.  So from what i 
gather this is working the way it should.  If you set the 'Reviewer' 
role on the member when you do member.getRoles() you get ('Reviewer',) 
instead of ('Reviewer','Authenticated') like in CMFMember.  Is this correct?

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.

3) The way that i set up the password reset seems a bit quirky.  If you 
are logged in as 'bob' and you go to change your password it gets 
changed correctly but will sometimes log you out.  You can log back in 
ok but that is a bit inconvenient :)   Here is another scenario that 
doesn't quite work.  You log in as 'jane' and you have the right to edit 
bob's password.  Bob has already logged in with his current password and 
his session is still active.  Jane resets bob's password.  Bob can't log 
in until he closes his browser or clears his cookies.  Once the cookies 
are cleared then he can log back in fine.  Maybe we need to hook into 
another method on the _setPassword() method to make this work cleaner 
rather than the credentialsChanged() from the Membership Tool.

Haven't had a chance to implement what was mentioned in the other emails 
about the tools yet.  Hopefully we can clean that stuff up soon.

Also, can you take a look at the test i set up.  Let me know if it makes 
sense and if it's set up correctly.

Best,
Clayton
-- 
S i x  F e e t  U p , I n c.  |  "Nowhere to go but open source"
Silicon Valley: +1 (650) 401-8579 x603
Midwest: +1 (317) 861-5948 x603
Toll-Free: 1-866-SIX-FEET
mailto:clayton@...
http://www.sixfeetup.com  |  Zope Hosting from $19.95/month

Return to date view: threaded or flat