## 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 Student in this context """ 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) isStudent = "Student" in roles isStaff = not isStudent isManager = "Manager" in roles or "SectionManager" in roles or isStaff return isStudent