[Zope] Authentication question.
Stuart Bishop
zen@cs.rmit.edu.au
Sat, 24 Jun 2000 09:55:11 +1000 (EST)
On Fri, 23 Jun 2000, Gregory Haley wrote:
> we are building an application that needs more information
> for users than that which is made available via the
> acl_users db (which can only contain username, password,
> domains, and roles). specifically, we have created an RDBS
> database which tracks users via a numeric user id (and
> speeds lookups), all tables are related via this integer
> variable.
Nothing yet abstracts out the username from the userid (although this
is now documented in the Zope Interfaces wiki so it is comming).
You can achieve the functionality you want by writing a plugin for
LoginManager, or modifying UserDB or the GenericUserFolder.
UserDB might do what you are after out of the box actually - I'm not
sure. These products are all available on www.zope.org.
LoginManager's GenericUserSource and the GenericUserFolder would
both require username->userid lookups in your situation whenever
you access a user objects attributes (eg. retrieve a list of roles).
However, if you are doing this via a ZSQL method this is a fairly
insignificant overhead if you remember to use the ZSQL methods cache
settings thus saving RDBMS lookups.
--
Stuart Bishop Work: zen@cs.rmit.edu.au
Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au
Computer Science, RMIT University