Look up users role and if workflow state of document/object is published
by
Wyden Silvan
—
last modified
30.10.2009 13:50
from AccessControl import getSecurityManager
mystate = context.portal_workflow.getInfoFor(context, 'review_state')
user = getSecurityManager().getUser();
userRoles = user.getRoles()
if mystate == 'published' and not 'Manager' in userRoles or context.absolute_url() == context.portal_url() + '/tabellenvorlage' :
return False
else:
return True
