[Zope] Fw: [Zope] Zope and Database user authentication

Jim Sanford jsanford@atinucleus.com
Tue, 12 Oct 1999 22:19:00 -0500


I handled this by creating a username and password in the top level
acl_users folder. I then wrap every call to retrieve data in a call
(<dtml-in "Query.UserSettings()"> )to an SQL method that returns permissions
and other settings for the authenticated user's name. The SQL methods have
embedded tests for what data can be returned based on the user settings.

Jim Sanford
----- Original Message -----
From: Stuart 'Zen' Bishop <zen@cs.rmit.edu.au>
To: Frank-Dieter Berg <Frank-Dieter.Berg@d2mannesmann.de>
Cc: <zope@zope.org>
Sent: Tuesday, October 12, 1999 7:28 PM
Subject: Re: [Zope] Zope and Database user authentication


> On Tue, 12 Oct 1999, Frank-Dieter Berg wrote:
>
> > Is there any way to provide individual user logins for relational
> > databases through ZOPE. So a user can access his own database account
> > with his rights controlled by the databaserather by a fixed database
> > connection?
> >
> > Tanks for some help.
>
> I came up with a fairly non-scalable way of doing this:
>
>     Create a database connection in a folder called something generic like
>     'CurrentUserConnection', with only manager with rights to it.
>
>     Create your SQL methods using CurrentUserConnection as their
connection
>     ID
>
>     Create a sub folder for each user, each one containing a database
>     connection called 'CurrentUserConnection', which logs on as that
particular
>     user.
>
>     If you are paranoid, delete, rename or move the original
>     CurrentUserConnection
>
> In theory this would do what you are after, but I havn't tested it. The
> trick is to see if a ZSQL method aquires its database connection, or if
> is is somehow a stronger link.
>
> I think It would be very nice to make basic user objects folderish,
> and extend the aquisition rules to check the contents of the currently
> authenticated user's folder. I'd submit this to the collector if
> I didn't have to leave for a meeting right now... <exit stage left>
>
>  ___
>    //     Zen (alias Stuart Bishop)     Work: zen@cs.rmit.edu.au
>   // E N  Senior Systems Alchemist      Play:
zen@shangri-la.dropbear.id.au
>  file://__     Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (Related lists - please, no cross posts or HTML encoding!
>
> To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
>