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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
amrani
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 @@
...
@@ -52,12 +52,15 @@
<key>
<string>
_body
</string>
</key>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from AccessControl import getSecurityManager\n
<value>
<string>
from AccessControl import getSecurityManager\n
from zExceptions import Unauthorized\n
from zExceptions import Unauthorized\n
u=getSecurityManager().getUser()
\n
from pprint import pformat
\n
\n
\n
print \'User:\',u\n
u = getSecurityManager().getUser()\n
print \'Is owner:\',u.allowed(context,(\'Owner\',))\n
\n
print \'User roles:\',u.getRoles()\n
print \'User:\', u\n
print \'User roles in context:\',u.getRolesInContext(context)\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
for permission in [\n
\'Access contents information\',\n
\'Access contents information\',\n
\'Add portal content\',\n
\'Add portal content\',\n
...
@@ -66,12 +69,17 @@ for permission in [\n
...
@@ -66,12 +69,17 @@ for permission in [\n
\'View\',\n
\'View\',\n
\'Manage portal\',\n
\'Manage portal\',\n
]:\n
]:\n
print permission,u.has_permission(permission,context)\n
print " ", permission, u.has_permission(permission, context)\n
\n
print\n
try:\n
try:\n
print
u.getGroups(
)\n
print
"User groups:\\n", pformat(u.getGroups()
)\n
except AttributeError:\n
except AttributeError:\n
print \'no getGroups\'\n
print \'no getGroups\'\n
\n
\n
print\n
print \'Local roles on document:\\n\', pformat(context.get_local_roles())\n
\n
print \'\'\'\n
print \'\'\'\n
----------------\n
----------------\n
Security mapping\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