Security validation issue

H

Herman Geldenhuys

I've written a Zope product that exposes a "MenuItem". I add a menuItem in a Zope folder, and I have no difficulty accessing and editing it via the ZMI. I've written an xml-rpc-like protocol for Zope, that basically validates the security "manually".

This menuItem has an attribute called "def getVersion(self):" which returns an int.

This is the Code that prevents me from accessing the method in python, via my protocol:

if not AccessControl.getSecurityManager().validate(None, object, attributes[-1]):
raise UnauthorisedAccessException('Unauthorised: ' + originalAddress)

object = <bound method HWMenuItem.getVersion of <HWMenuItem instance at 01B7B290>>
This is the method getVersion

attributes[-1] = "getVersion" (string)

UnauthorisedAccessException: Unauthorised: menus.administration.addUser.getVersion

This code works for any other default Zope type, but not mine. Did I perhaps forgot a permission or something?

I can access this fine via the ZMI, but when I validate it this way, python just starts cursing at me.

Can somebody help?

Thanks

H
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,665
Latest member
salkete

Latest Threads

Top