[Zope3-Users] ForbiddenAttribute problem with viewlet manager and
hurry.workflow
Thierry Florac
thierry.florac at onf.fr
Wed Oct 18 07:31:05 EDT 2006
Hi,
I'm trying to use the "hurry.workflow" package (loaded from CVS) to
handle a simple workflow.
I've created a ViewletManager to display available transitions, but a
ForbiddenAttribute exception is raised. I know that this exception is
due to missing permissions settings, but no configuration is working...
This is the code of my viewlet manager :
class WorkflowTransitions(object):
implements(IContentProvider)
adapts(Interface, IDefaultBrowserLayer, Interface)
template = ViewPageTemplateFile('transitions.pt')
def __init__(self, context, request, view):
self.context = context
self.request = request
self.__parent__ = view
def update(self):
wf = zapi.queryUtility(IWorkflow)
if wf is not None:
info = IWorkflowInfo(self.context)
self._transitions = info.getManualTransitionsIds()
else:
self._transitions = []
@property
def transitions(self):
return self._transitions
def render(self, *args, **kw):
return self.template(self, *args, **kw)
I've tryed to define several security declarations in ZCML, but none is
working. The exception is raised while accessing
"getManualTransitionIds()" method :
File ".../onf/publication/browser/viewlets/transition/__init__.py", \
line 45, in update
ids = info.getManualTransitionsIds()
ForbiddenAttribute: ('getManualTransitionsIds', \
<hurry.workflow.workflow.WorkflowInfo object at 0xb4f5cd8c>)
I've also tried to use a simple content provider with an adapter but got
the same result.
Thanks for any help,
Thierry Florac
--
Chef de projet intranet/internet
Office National des Forêts - Département Informatique
2, Avenue de Saint-Mandé
75570 PARIS Cedex 12
Mél : thierry.florac at onf.fr
Tél. : +33 01.40.19.59.64
Fax. : +33 01.40.19.59.85
More information about the Zope3-users
mailing list