Created
May 13, 2014 11:15
-
-
Save martior/b93dd0ec4cf1bee4eaa9 to your computer and use it in GitHub Desktop.
Mocukp request and secrutiy manager for Plone debug prompt or console scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from AccessControl.SecurityManagement import newSecurityManager | |
from Testing import makerequest | |
from zope.site.hooks import setHooks | |
from zope.site.hooks import setSite | |
root = makerequest.makerequest(app) | |
site = root.get('Plone') | |
setHooks() | |
setSite(site) | |
uf = app.acl_users | |
user = uf.getUserById("admin") | |
newSecurityManager(None, user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment