[Zope-PTK] LoginManager and local roles (feature request)

Phillip J. Eby pje@telecommunity.com
Sat, 22 Apr 2000 21:06:31 -0500


At 11:04 AM 4/22/00 -0300, Lalo Martins wrote:
>It is not possible to use local roles with LoginManager because
>it lacks a getUserNames method.
>
>I could try to implement it, are you interested? Or is someone
>already working on this, or is there some non-obvious
>complication to it?

Unfortunately, local roles are broken independently of LM's lack of
"getUserNames".  If you have a user database with thousands of users, the
current local roles system is capable of crashing browsers (not to mention
being really tough on performance.)  Mike Pelletier was going to champion a
patch to the local roles subsystem to fix this, but I don't know what the
status is.  Basically, the idea of the change was simply to do away with
the user drop-down list and replace it with a text box where you could type
the name of the user you wanted to set roles for.

Ty and I are campaigning for the removal of "getUserNames" from the
interfaces used by Zope internally, since it is not scalable to large
portals (or any other kind of application with a large user base).  While
something like that function may eventually show up in LoginManager, it is
not going to be soon.  Of course, it can be trivially added by anyone who
cares to, just by adding a PythonMethod or DTML Method to the "Contents"
tab of your LoginManager.  That's one of the great things about the
Implementor/Rack pattern that LoginManager is based on: it's easy to
customize at site integration time, without altering the base product.