Commit 69419bf4 authored by Nicolas Delaby's avatar Nicolas Delaby

2008-06-16 Nicolas

Add external Method to see Security for arbitrary user

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21606 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8fc49b77
def viewSecurityAsUser(self, login):
from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager
user_folder = self.getPortalObject().acl_users
sm = getSecurityManager()
try:
new_user = user_folder.getUserById(login)
newSecurityManager(user_folder, new_user)
st = self.Base_viewSecurity()
finally:
setSecurityManager(sm)
return st
\ No newline at end of file
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ExternalMethod" module="Products.ExternalMethod.ExternalMethod"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_function</string> </key>
<value> <string>viewSecurityAsUser</string> </value>
</item>
<item>
<key> <string>_module</string> </key>
<value> <string>Security</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_viewSecurityAsUser</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
2008-06-16 Nicolas
Add external Method to see Security for arbitrary user
2008-06-04 yusei
* Add comment column in the glossary module listbox.
......
241
\ No newline at end of file
243
\ No newline at end of file
Glossary
PythonScriptParserUtility
\ No newline at end of file
PythonScriptParserUtility
Security
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment