-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements in TALES tests and Interfaces display #4
Conversation
[glenfant] - Provide same variables as in portal_actions in TAL tests [glenfant]
And I just removed the 'xxx__roles__' methods today and replaced by the human readable security assertions for each method like "Roles: Manager, Owner. Permission: Add portal content". Please merge ! |
Conflicts: CHANGES.txt
Improvements in TALES tests and Interfaces display
@jensens BTW, I'm unaware of what the state of the package is. I can make a release for you if you'd like(or give you rights to do so). I think it's working and useful, maintenance mode :) |
It would be great if you release it. And yes, its useful, esp. while teaching Plone. |
if secu_infos is None: | ||
secu_label = 'Public' | ||
else: | ||
secu_label = 'Roles: ' + ', '.join([r for r in secu_infos[:-1]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@glenfant @vangheem I'm getting an error here:
File "/home/thet-data/data/dev/cloud19/wireframe/noeku-buildout/src/plone.app.debugtoolbar/src/plone/app/debugtoolbar/browser/context.py", line 118, in update
secu_label = 'Roles: ' + ', '.join([r for r in secu_infos[:-1]])
TypeError: sequence index must be integer, not 'slice'
the secu_infos object is the following:
(Pdb) secu_infos
<imPermissionRole object at 0x7fd16559f5b0>
(Pdb) secu_infos.__class__
<type 'imPermissionRole'>
(Pdb) secu_infos.__doc__
'imPermissionRole C implementation'
as you can see above, i'm using the C
security mplementation. normally in development environments, we use the python security implementation with verbose-security on
set for plone.recipe.zope2instance
. maybe this error doesn't occur for the Python security implementation.
anyways, this should be fixed!
@glenfant please annotate your code a bit more with some comments. it's not obvious, what it does, especially where you do all the list slicing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[glenfant]
[glenfant]
Note that the new comments for TALES test in template will break one translation label.