Skip to content
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

Merged
merged 3 commits into from
May 9, 2014

Conversation

glenfant
Copy link
Contributor

[glenfant]

  • Provide same variables as in portal_actions in TALES tests
    [glenfant]
  • Emphasize marker interfaces with an (ugly) "(*)" prefix.

Note that the new comments for TALES test in template will break one translation label.

  [glenfant]

- Provide same variables as in portal_actions in TAL tests
  [glenfant]
@glenfant
Copy link
Contributor Author

glenfant commented Jun 1, 2012

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 !

@jensens
Copy link
Member

jensens commented May 9, 2014

since it seems theres no active maintainer: please merge this one if it still works.
@optilude @vangheem whats the state of this package?

vangheem added a commit that referenced this pull request May 9, 2014
Improvements in TALES tests and Interfaces display
@vangheem vangheem merged commit 63d8727 into plone:master May 9, 2014
@vangheem
Copy link
Member

@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 :)

@jensens
Copy link
Member

jensens commented May 12, 2014

It would be great if you release it. And yes, its useful, esp. while teaching Plone.

@frisi
Copy link

frisi commented May 12, 2014

@vangheem, @jensens as you're having a discussion about this package. could you comment on #8? if other people using this addon are fine with this change, i'll work on these changes in the next time.

if secu_infos is None:
secu_label = 'Public'
else:
secu_label = 'Roles: ' + ', '.join([r for r in secu_infos[:-1]])
Copy link
Member

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glenfant never mind, i fixed the issue here: 8859bdb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants