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):
            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()
                    self._transitions = []
            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
  Tél. : +33
  Fax. : +33

Zope3-users mailing list

Reply via email to