Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from StringIO import StringIO
- from Products.PlonePAS.Extensions.Install import configurePlonePAS, setupAuthPlugins, activatePluginInterfaces, challenge_chooser_setup
- import transaction
- out = StringIO()
- parent = app
- parent.manage_addProduct['PluggableAuthService'].addPluggableAuthService()
- uf = parent.acl_users
- pas = uf.manage_addProduct['PluggableAuthService']
- plone_pas = uf.manage_addProduct['PlonePAS']
- configurePlonePAS(parent, out)
- setupAuthPlugins(parent, pas, plone_pas, out,
- deactivate_basic_reset=False,
- deactivate_cookie_challenge=True)
- # Activate *all* interfaces for user manager. IUserAdder is not
- # activated for some reason by default.
- activatePluginInterfaces(parent, 'users', out)
- # Configure Challenge Chooser plugin if available
- challenge_chooser_setup(parent, out)
- transaction.commit()
- out.seek(0)
- print out.read()
Add Comment
Please, Sign In to add comment