Changeset 885 for WAeUP_SRP/trunk/skins/waeup_default
- Timestamp:
- 17 Nov 2006, 16:06:47 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_default
- Files:
-
- 3 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/isClearanceOfficer.py
r875 r885 5 5 ##bind script=script 6 6 ##bind subpath=traverse_subpath 7 ##parameters= info=None7 ##parameters= 8 8 ##title= 9 9 ## 10 10 # $Id$ 11 """12 11 13 """14 wftool = context.portal_workflow15 12 mtool = context.portal_membership 16 member = mtool.getAuthenticatedMember() 17 18 if info is None: 19 info = context.getStudentInfo() 20 if info is None: 21 return False 22 if info['course'] is None: 23 return False 24 25 res = context.portal_catalog(portal_type="Department",id=info['course_doc'].department) 26 if len(res) != 1: 27 return False 28 29 roles = member.getRolesInContext(res[0].getObject()) 30 13 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 31 14 return "ClearanceOfficer" in roles 32 15 -
WAeUP_SRP/trunk/skins/waeup_default/isManager.py
r874 r885 9 9 ## 10 10 # $Id$ 11 """12 return True if the member is considered a Manager,13 consider all non-Student members to be Managers14 11 15 """ 16 return context.isStaff() 12 mtool = context.portal_membership 13 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 14 return "Manager" in roles -
WAeUP_SRP/trunk/skins/waeup_default/isStaff.py
r879 r885 9 9 ## 10 10 # $Id: $ 11 """12 11 13 """14 12 mtool = context.portal_membership 15 if mtool.isAnonymousUser(): 16 return False 17 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 18 return not "Student" in roles 13 member = mtool.getAuthenticatedMember() 14 roles = member.getRolesInContext(context) 19 15 16 return "SectionManager" in roles or\ 17 "ClearanceOfficer" in roles or\ 18 "ClearanceOfficers" in member.getGroups() -
WAeUP_SRP/trunk/skins/waeup_default/isStudent.py
r874 r885 9 9 ## 10 10 # $Id$ 11 """ 12 return True if the member is considered a Student 13 """ 14 roles = context.portal_membership.getAuthenticatedMember().getRolesInContext(context) 11 12 mtool = context.portal_membership 13 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 15 14 return "Student" in roles
Note: See TracChangeset for help on using the changeset viewer.