Guest User

Untitled

a guest
Jul 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. from StringIO import StringIO
  2. from Products.PlonePAS.Extensions.Install import configurePlonePAS, setupAuthPlugins, activatePluginInterfaces, challenge_chooser_setup
  3. import transaction
  4.  
  5. out = StringIO()
  6.  
  7. parent = app
  8. parent.manage_addProduct['PluggableAuthService'].addPluggableAuthService()
  9.  
  10. uf = parent.acl_users
  11.  
  12. pas = uf.manage_addProduct['PluggableAuthService']
  13. plone_pas = uf.manage_addProduct['PlonePAS']
  14.  
  15. configurePlonePAS(parent, out)
  16.  
  17. setupAuthPlugins(parent, pas, plone_pas, out,
  18. deactivate_basic_reset=False,
  19. deactivate_cookie_challenge=True)
  20.  
  21. # Activate *all* interfaces for user manager. IUserAdder is not
  22. # activated for some reason by default.
  23. activatePluginInterfaces(parent, 'users', out)
  24.  
  25. # Configure Challenge Chooser plugin if available
  26. challenge_chooser_setup(parent, out)
  27.  
  28. transaction.commit()
  29. out.seek(0)
  30. print out.read()
Add Comment
Please, Sign In to add comment