[Zope] Q: LoginManager and SQL-US?

J. Atwood jatwood@bwanazulia.com
Tue, 13 Jun 2000 13:14:27 -0400


I think this is what you want...

http://www.zope.org/Members/hippy/GUF_SQL_crypt_1_2

How To: Use GenericUserFolder with an SQL database Version 1.1

J


From: Wilkinson Charlie E <Charlie.E.Wilkinson@irs.gov>
Date: Tue, 13 Jun 2000 11:29:48 -0400
To: zope@zope.org
Subject: [Zope] Q: LoginManager and SQL-US?



Ok, I've got this legacy database app (VisualBasic and Access - Bleck!)
that I'm moving to Apache/Zope/PostgreSQL.  One of the existing database
tables is user info, i.e. userid, password, real name, an "account
disabled" boolean, etc.

I've figured out a really stupid way to "solve" the problem, essentially
doing queries against the user table and having conditionals in every
DTML object to determine if the user should be there or not.  (Actually,
I negated some of that silliness by incorporating SQLSession into the
mix.)  Still, I'm faced with needing some way to check the user/session
against each requested object.  And no, there's not much access
granularity here - the user should either have access to the whole
folder, or not. 

LoginManager looks promising, but I'm still enough of a Zope newbie that
I've hit a bit of a roadblock, boiling down (boiled roadblock?!?) to 2
fundemental questions:

        1. Can LoginManager be (easily?) made to meet my specific need?
        2. Has anyone done an SQL UserSource yet, or can anyone
           give me a clue how to make one?

I've tried "creating" another US, but after that Zope just sits there,
quietly mocking me.  I did read the API stuff and that actually makes
a little sense to me, but I don't know what types of objects (or
external methods?) would need to be created as part of a new US
interface.  In other words, I more or less understand the API calls, I
can do SQL queries in my sleep, but how does one tie it all together
into a new US?  Does it involve (*shudder*) writing Python? ;)

I'd be happy to share back any useful results of this exercise.

Thanks for any help,
        Charlie 

-- 
Charlie Wilkinson - TRIS Development Systems Administrator
IS:SD:CT:CC:TD 
Phone: 202-283-3241
MSMail:   Charlie E Wilkinson <mailto:Charlie E Wilkinson>
SMTP:  cwilkins@tris.irs.gov <mailto:cwilkins@tris.irs.gov>
Home:  cwilkins@boinklabs.com
This message constructed from 90% post-consumer electrons.