[Zope-PAS] Re: nothing implements IMutableUserFolder

Kapil Thangavelu hazmat at objectrealms.net
Mon Feb 7 17:58:08 EST 2005


On Sun, 2005-02-06 at 18:22 -0500, Tres Seaver wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Janko Hauser wrote:
> | Hi, I'm trying to incorporate a PAS acl_users during site setup. For
> | testing I use ZopeTestCase. This packages uses userFolderAddUser() to
> | generate specific users for the tests. Which does not function with PAS.
> |
> | Looking through the PAS code I realized, that nothing implements the
> | interfaces IMutableUserFolder, which defines the missing
> | method. Before I start to digg further I wanted to ask, if there are
> | reasons that PAS currently does not fullfill this interface?
> |
> | It looks a little bit difficult, as it needs to interact with several
> | plugins as it defines a user and gives this user a list of roles.
> 
> 
> You will need to add a plugin which can have users added (e.g., a
> ZODBUserManager) and activate it for IUserAdderPlugin.  You also need to
> add a role assigner (e.g., ZODBRoleManager) and activate it for
> IRoleAssignerPlugin.  Your code can then call '_doAddUser' to add the
> user object.
> 
> You could submit a collector issue with patch to add the TTW-callable
> versions ('userFolderAddUser', 'userFolderEditUser', and
> 'userFolderDelUsers') if you have a use case for them.
> 

we (plone folks) have a use case for them, although it relates more to
getting pas to implement more of the standard zope user folder
interface. currently pas only implements user add api. based on that we
came up with a usermanagement interface plugin which embodies writes to
the user sources which is delegated to by a standard user folder api
implementation in pas as well as adding the ttw callable user folder api
methods. the interface..

class IUserManagement( plugins.IUserAdderPlugin ):

    """ Manage users
    """

    def doChangeUser( login, password, **kw):
        """
        change a user's password ( differs from role )
        roles are set in the pas engine api for
        the same but are set via a role manager )
 
        o Return a Boolean indicating whether a user was modified or not
        """

    def doDeleteUser( login ):
        """
        Remove a user record from a User Manager, with the given login
        and password

        o Return a Boolean indicating whether a user was removed or not
        """


i'd like to merge this back to the pas cvs if it sounds good.

cheers,

-kapil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope-pas/attachments/20050207/93d7ee69/attachment.bin


More information about the Zope-PAS mailing list