## Script (Python) "cpsdocument_edit" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=student=None ##title= ## # $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $ """ return True if the member is considered a Manager, consider all non-Student members to be Managers """ request = context.REQUEST wf = context.portal_workflow mtool = context.portal_membership member = mtool.getAuthenticatedMember() path_info = request.get('PATH_INFO').split('/') #roles = member.getRolesInContext(context) roles = member.getRoles() isStudent = "Student" in roles isStaff = not isStudent #isManager = "Manager" in roles or "SectionManager" in roles or isStaff isManager = isStaff return isManager