[Zope3-Users] ForbiddenAttribute problem with viewlet manager and hurry.workflow
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', \ ) 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 : [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
Re: [Zope3-Users] ForbiddenAttribute problem with viewlet manager and hurry.workflow
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', \ > ) 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
Re: [Zope3-Users] ForbiddenAttribute problem with viewlet manager and hurry.workflow
On Wednesday 18 October 2006 07:31, Thierry Florac wrote: > 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... See my other post on manually making registrations. Also the "hurry.workflow"'s configure.zcml file does not contain much. You certainly will have to add some more yourself. It looks like hurry.workflow will need some TLC (Tender, Love, and Care) to work nicely again. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users