betabug... Sascha Welter

home english | home deutsch | Site Map | Sascha | Kontakt | Pro | Weblog | Wiki

06 April 2010

ValueError: The permission XYZ is invalid

It ain't used really

Oh, and while I'm at the topic of "stupid little things I've left off half finished", let me add a note to self: When you get an error "ValueError: The permission XYZ is invalid" in Zope 2, it's because you've set up a permission (e.g. with manage_permission()), but you haven't actually used it to declare security on a method somewhere.

This will probably bite you only if you prepare for using that new permission, then leave things as they are, only to later return and innocently expect unit tests to run through. When in doubt, just add a bogus method that is declareProtected() with your new permission and the Tracebacks will stop blowing up in your face.

Posted by betabug at 16:12 | Comments (0) | Trackbacks (0)
ch athens
Life in Athens (Greece) for a foreigner from the other side of the mountains. And with an interest in digital life and the feeling of change in a big city. Multilingual English - German - Greek.
Main blog page
Recent Entries
Best of
Some of the most sought after posts, judging from access logs and search engine queries.

Apple & Macintosh:
Security & Privacy:
Misc technical:
Athens for tourists and visitors:
Life in general:
<< Picking up on a New Feature | Main | Local Lunch >>
There are no comments.
You can trackback to:
There are no trackbacks.