[Zope-PTK] SQL user database with the Portal Wizard (revisited?)
Tres Seaver
tseaver@digicool.com
Thu, 25 Jan 2001 01:12:32 -0500
"Kurt D. Bollacker" wrote:
>
> I'm trying to create a portal with the wizard, and use a MySQL
> database to store user information. I created the tables
>
> create table users (
> username varchar(255),
> password varchar(255),
> domains varchar(255),
> roles varchar(255));
>
> create table propertysheets (
> username varchar(255),
> propertysheet varchar(255),
> property varchar(255),
> value varchar(255));
>
> but when I try to <Finish> the portal creation, I get:
>
> Zope has encountered an error while publishing this resource.
>
> Error Type: AttributeError
> Error Value: __propsets__
>
> (traceback included below)
>
> Bill Anderson asked about this (or a very similar) problem 9 months
> ago, with little resolution. I'm creating an entire site around the
> PTK, and I need the user info to be in an SQL database. Is there a
> way to solve the above problem or some other way to get an SQL DB to
> work with the PTK? There was some talk about using LoginManager, but
> that seems still in early development, so I don't know if it's stable
> enough. If anyone has an SQL implementation for LoginManager, that
> would be great as well. * http://www.zope.org/Members/dlpierson/sqlLogin
>
> Any information is greatly appreciated.
A couple of things that may help (but it isn't there "out of the
box"):
* If you have a "plain" user folder which does what you want
*above* your portal instance (e.g., in the root of the Zope),
then you should be able to delete the 'acl_users' in the portal
and use what we have dubbed "transparent membership": the
'portal_membership' and 'portal_memberdata' tools can wrap the
user objects returned by a non-PTK user folder with appropriate
membership context.
* For hints about setting up LoginManager with SQL, see:
o http://www.zope.org/Members/dlpierson/sqlLogin
- Does newer "SkinScript"-style version.
o http://www.zope.org/Members/jok/SQL_based_LoginManager
- Does "simple", "GenericUserFolder"-style implementation
o http://www.zope.org/Members/hippy/GUF_SQL_crypt_1_2
- Older, based on the "GenericUserFolder" product (but the
concepts apply).
* If you want to store portal-specific membership data (not
just authentication/authorization) in your SQL tables, you
will need to replace the 'portal_membership' tool with another
object which implements its interface (see
'PTKBase/interfaces/portal_memberdata.py'), making appropriate
SQL calls.
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org