Generic User Folder - custom user properties
I have (I hope) simple question : I use Generic User Folder for authentication of users against Postgress database. I rewrote the appropriate DTML methods, and it works. However, with the AUTHENTICATED_USER, I only get the name of user, its roles and domain. I need to associate another attribute/property, called 'user_id', which is an integer value of the user's record in the database. The value should then be used in subsequent SQL queries on behalf of the user. My question is, if it is possible (so that I can then call "AUTHENTICATED_USER.getProperty('user_id')") and at which point of Generic User Folder/authentication process I should assign the property value? Is there an easy way? Thanks, Michal Bukovjan
On Tue, 18 Apr 2000, Michal Bukovjan wrote:
My question is, if it is possible (so that I can then call "AUTHENTICATED_USER.getProperty('user_id')") and at which point of Generic User Folder/authentication process I should assign the property value?
Not yet. This is one of the design goals of the LoginManager product currently being developed.
Is there an easy way?
The best you can do is to create a method called user_id (possibly accepting a user object as an argument) which returns the correct value. -- ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
Hmm, it looks like I found a solution. I use FSSession product, and upon a successful login, I set the 'user_id' session variable. Thanks for the help, Michal Bukovjan Stuart 'Zen' Bishop wrote:
On Tue, 18 Apr 2000, Michal Bukovjan wrote:
My question is, if it is possible (so that I can then call "AUTHENTICATED_USER.getProperty('user_id')") and at which point of Generic User Folder/authentication process I should assign the property value?
Not yet. This is one of the design goals of the LoginManager product currently being developed.
Is there an easy way?
The best you can do is to create a method called user_id (possibly accepting a user object as an argument) which returns the correct value.
-- ___ // Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au // E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au //__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Michal Bukovjan -
Stuart 'Zen' Bishop