Attention

This document was written for an unsupported version of Plone, Plone 2.1.x, and was last updated 1501 days ago.

For more information, see the version support policy.

To learn how to upgrade to the current version of Plone, read the upgrade manual.

Authenticate users from PostgreSQL using SQLUserFolder

by Chris Miles last modified Apr 09, 2009 01:54 PM
How to use SQLUserFolder to authenticate Plone users from a remote PostgreSQL database.

Step 1:

  • install Zope and Plone
  • touch GroupUserFolder/preview.txt
  • restart Zope
  • add a Plone site
    • it is created with an: acl_users (Group-aware User Folder)
    • Users/Groups now work as usual; using default UserFolders with acl_users

Step 2:

Step 3:

  • [Setup PostgreSQL if not already!]
  createuser -U postgres zopeauth
  createdb -U postgres zopeauth
  psql -U postgres zopeauth -f SQLUserFolder/schema/postgresql

Step 4:

  • restart Zope

Step 5:

  • In Plone root, add a Z Psycopg Database Connection:
  id=  "auth_db"
  Connection String= "dbname=zopeauth user=zopeauth"
  • in Plone Setup Add/Remove: Install SQLUserFolder [This will install the ZSQL methods into portal_skins/SQLUserFolder/]
  • acl_users / Sources: "User source #1" Replace with SQLUserFolder - leave defaults
  • acl_users / Sources: "Groups source" - Replace with SQLUserFolder - change as per below
    • Name of user accounts (or groups) relation (table) = "zope_suf.groups"
    • Name of relation (table) holding login (or group) to role maps = "zope_suf.grouproles"

.. I think that is it. Access front-end and try to Join and then Login


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.