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).
First I tracked down what seems to be the relevant section in
/lib/python/AccessControl/Role.py, in the section labeled 'Local roles
if hasattr(aq_base(item), 'acl_users') and \
for name in item.acl_users.user_names():
if not hasattr(item, 'aq_parent'):
Then I tracked down the user_names attribute to
/lib/python/AccessControl/User.py, in the section labeled 'Private
Well, that wasn't very helpful. searching a bit more and I find:
"""Return a list of usernames"""
Experimenting a bit, I find that a normal user folder object responds to
an /acl_users/user_names URL with an error, but does respond to an
/acl_users/getUserNames URL with a list of user names.
And now I'm stuck. I *think* that LoginManager needs a getUserNames
method that cycles through the available User Sources and grabs a list
names from each, concatenating them into one big list to return. I'll
settle for some code that has the User Source name hard-wired in,
However, IANAC (I Am Not A Coder), and I don't know how to do this. If
anyone can offer a cut-and-paste set of instructions to add this into
LoginManager or Membership, it would be greatly appreciated.
If I've missed something obvious or misunderstood the problem, please
tell me that too.
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -