[Zope-dev] Membership and Local Roles
Michael Bernstein
mbernstein@profitscape.com
Mon, 18 Sep 2000 16:36:59 -0500
Steve Alexander wrote:
>
> Michael Bernstein wrote:
>
> > I posted this to the PTK list on Friday, but didn't get any responses
> > over the weekend, so I'm reposting here.
> >
> > I feel that a barrier to Loginmanager and Membership becoming more
> > generally usable for site builders is it's current lack of support for
> > local roles. Specifically, members do not show up in the local roles
> > screen (manage_listLocalRoles) user list.
> >
> > Through the magic of grep and find, I think I've identified the relevant
> > sections of code in Zope that need to be duplicated in Membership (or
> > maybe in LoginManager).
>
> I think you've found out why local roles don't work. Congratulations on
> a successful code hunting mission :-)
I *think* I've created a getUserNames python method that returns the
appropriate results:
Parameter list:
self
Body:
user_ids=self.UserSource.getPersistentItemIDs()
names=[]
for i in user_ids:
names.append(self.getItem(i))
return names
I basically copied the Membership getMembers python method for this.
Guess what? It still doesn't work.
I don't understand the differences between the code I pasted above and
the code on the original getUserNames method (from :
def getUserNames(self):
"""Return a list of usernames"""
names=self.data.keys()
names.sort()
return names
Can anyone tell me what I need to fix?
Michael Bernstein.