[Zope] Not authorised to assign proxy role

Kevin Teague kevin@bud.ca
Mon, 19 Feb 2001 03:43:18 -0800


> What has changed, and what can I do to achieve what I want?

Security was increased for Zope 2.2. This document on Zope Security for
Developers may be helpful:
http://dev.zope.org/Wikis/DevSite/Projects/DeclarativeSecurity/ZopeSecurityF
orDevelopers

If you want to assign a proxy role to a DTML Method, the user you are logged
in as must have that role. In the case of generating new local roles
dynamically like you are, obviously no user will have that role. You can
assign proxy roles to a DTML Method from your Python Product by messing with
the _proxy_roles attribute, a tuple which contains all the proxy roles that
that DTML Method has.

self._proxy_roles = ('unique_proxy_role',)

Although I'm not certain if it's safe or wise to do that, but it does work
:)

Kevin Teague
http://www.bud.ca