--- a/src/pyams_workflow/content.py Thu Oct 08 11:38:12 2015 +0200
+++ b/src/pyams_workflow/content.py Thu Oct 08 11:39:17 2015 +0200
@@ -111,17 +111,15 @@
def is_visible(self, request=None):
# associated workflow?
- wf_name = IWorkflowManagedContent(self.__parent__).workflow_name
+ content = IWorkflowManagedContent(self.__parent__)
+ wf_name = content.workflow_name
if not wf_name:
return True
# check workflow?
- workflow = query_utility(IWorkflow, name=wf_name)
- if workflow is None:
- return False
- if workflow.view_permission:
+ if content.view_permission:
if request is None:
request = check_request()
- if not request.has_permission(workflow.view_permission, context=self.__parent__):
+ if not request.has_permission(content.view_permission, context=self.__parent__):
return False
return self.is_published()