Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
d5fab897
Commit
d5fab897
authored
Jan 08, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
administration: update Base_viewSecurity to display local roles defined on document
parent
9d710981
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_viewSecurity.xml
...em/portal_skins/erp5_administration/Base_viewSecurity.xml
+15
-7
No files found.
bt5/erp5_administration/SkinTemplateItem/portal_skins/erp5_administration/Base_viewSecurity.xml
View file @
d5fab897
...
...
@@ -52,12 +52,15 @@
<key>
<string>
_body
</string>
</key>
<value>
<string>
from AccessControl import getSecurityManager\n
from zExceptions import Unauthorized\n
u=getSecurityManager().getUser()
\n
from pprint import pformat
\n
\n
print \'User:\',u\n
print \'Is owner:\',u.allowed(context,(\'Owner\',))\n
print \'User roles:\',u.getRoles()\n
print \'User roles in context:\',u.getRolesInContext(context)\n
u = getSecurityManager().getUser()\n
\n
print \'User:\', u\n
print \'Is owner:\', u.allowed(context,(\'Owner\',))\n
print \'User roles:\', u.getRoles()\n
print \'User roles in context:\', u.getRolesInContext(context)\n
print \'Permissions:\'\n
for permission in [\n
\'Access contents information\',\n
\'Add portal content\',\n
...
...
@@ -66,12 +69,17 @@ for permission in [\n
\'View\',\n
\'Manage portal\',\n
]:\n
print permission,u.has_permission(permission,context)\n
print " ", permission, u.has_permission(permission, context)\n
\n
print\n
try:\n
print
u.getGroups(
)\n
print
"User groups:\\n", pformat(u.getGroups()
)\n
except AttributeError:\n
print \'no getGroups\'\n
\n
print\n
print \'Local roles on document:\\n\', pformat(context.get_local_roles())\n
\n
print \'\'\'\n
----------------\n
Security mapping\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment