You are here: Home Tech Becoming manager in ZODB

Becoming manager in ZODB

by Reed O'Brien last modified Aug 17, 2008 11:04 PM
Get manager privileges in an interactive ZODB session

 

Just import the newSecurityManager method and get adminuser.

 

>>> from AccessControl.SecurityManagement import newSecurityManager
>>> adminuser = app.acl_users.getUser('adminuser')
>>> newSecurityManager(None,adminuser)

 

 

newSecurityManager takes two arguments: request and user. Since we have no request in the interactive section we use None. The adminuser should be an existing user with manager privileges.

Share this: