Hello,
now that I have registered the PAU, I also want to add a removal part.

The creation part was this:

...
    def RenderRunOutput(self):
        """ Do the setup and output the result. """
        
        # Check for existing install        
        
        site = getSite()
        sm = site.getSiteManager()
        
        if sm.has_key('authentication'):
            return "Site is already set up"
        
        # Run istallation of pluggable authentication
        
        pau = PluggableAuthentication()
        sm['authentication'] = pau
        sm.registerUtility(pau, IAuthentication)
        users = PrincipalFolder()
        sm['authentication']['Users'] = users
        sm.registerUtility(users, IAuthenticatorPlugin, name="Users")
        pau.authenticatorPlugins = (users.__name__, )
        pau.credentialsPlugins = ( "No Challenge if Authenticated", 
                                   "Session Credentials" )
        
        return "Setup sucessfully ran!"
...


Now I try to do the following:


...

    def RenderRemoveOutput(self):
        """ Remove the PAU. """

        site = getSite()
        sm = site.getSiteManager()
        
       
        sm.unregisterUtility(sm['authentication']['Users'],
IAuthenticatorPlugin)
        sm.unregisterUtility(sm['authentication'], IAuthentication)
        
        return "to be removed"

...

This runs, but the utility does not disappear. 
So, how can I make it go away?

-- 
Sebastian Bartos, <seth.kriti...@googlemail.com>
keyserevr: pgp.mit.edu

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to