Le mercredi 18 octobre 2006 à 13:31 +0200, Thierry Florac a écrit : > 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>)
Oops, Sorry !! The error was a simple syntax error : correct method name is "getManualTransitionIds()", without the "s". But as said in a previous post, the ForbiddenAttribute exception is strange in such a case... Thanks, 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 : [EMAIL PROTECTED] Tél. : +33 01.40.19.59.64 Fax. : +33 01.40.19.59.85 _______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users