OK, so I have been working on a set of user management methods for Membership by 
tazzzz. I
have it where I can see a list of users, and their roles. now, what I need is a way to
modify Roles.

So, looking into the source, I see that roles exists (as currently implemented) as
__roles. This means that you can't modify roles from the web.

So, I added this to the MemberMixin:

    def changeRoles(self,roles):
        self.__roles=roles
        return self.getRoles()

Restartted zope, yadda yadda. Now, it appears to be setting the roles (if I return
self.__roles I see the changes), but the changes are not persistent, since the roles 
don't
seem to be changed. The above will return the same roles the user had prior to the 
call to
changeRoles. :(

So, thinking back to the transactional nature of the ZODB, I added a:
        get_transaction().commit(1)
...before the return ... no luck.

Then tried:
        get_transaction().commit(1)
...same result.

Now, it is getting early (you know, once you past 'late' ;^) ... and my brain is 
shutting
down. So I figured I would post this to the list, to see if anyone has any bright (or
not-so-bright) ideas. Yeah, I know the above is a total kludge, but I wan't to get this
working before re-implenting a 'bettr' default PUS, to make sure I understand what I am
doing. {:^)=

Bill


--
Do not meddle in the affairs of sysadmins, for they are easy to annoy,
and have the root password.

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to