Changeset 1957 for WAeUP_SRP/trunk/skins/waeup_default
- Timestamp:
- 25 Jun 2007, 18:45:38 (17 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_default
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/isCourseAdviser.py
r1581 r1957 9 9 ## 10 10 # $Id: isClearanceOfficer.py 1087 2006-12-18 22:13:31Z joachim $ 11 if context.isStudent(): 11 member = context.portal_membership.getAuthenticatedMember() 12 member_id = str(member) 13 for c in member_id: 14 is_student = True 15 if c not in ('0123456789'): 16 is_student = False 17 break 18 if is_student and len(member_id) == 7: 12 19 return False 13 mtool = context.portal_membership 14 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 20 # if context.isStudent(): 21 # return False 22 roles = member.getRolesInContext(context) 15 23 return "CourseAdviser" in roles 16 24 -
WAeUP_SRP/trunk/skins/waeup_default/isSectionOfficer.py
r1077 r1957 10 10 # $Id: isManager.py 888 2006-11-17 21:28:48Z henrik $ 11 11 12 if context.isStudent(): 12 member = context.portal_membership.getAuthenticatedMember() 13 member_id = str(member) 14 for c in member_id: 15 is_student = True 16 if c not in ('0123456789'): 17 is_student = False 18 break 19 if is_student and len(member_id) == 7: 13 20 return False 14 mtool = context.portal_membership 15 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 21 # if context.isStudent(): 22 # return False 23 roles = member.getRolesInContext(context) 16 24 return "SectionOfficer" in roles or\ 17 25 "SectionManager" in roles or\ -
WAeUP_SRP/trunk/skins/waeup_default/isStaff.py
r1737 r1957 10 10 # $Id: $ 11 11 12 if context.portal_membership.isAnonymousUser():13 return False14 return not context.isStudent()12 # if context.portal_membership.isAnonymousUser(): 13 # return False 14 # return not context.isStudent() 15 15 16 16 mtool = context.portal_membership 17 17 member = mtool.getAuthenticatedMember() 18 roles = member.getRolesInContext(context) 19 20 return "Manager" in roles or\ 21 "SectionManager" in roles or\ 22 "SectionOfficer" in roles or\ 23 "ClearanceOfficer" in roles or\ 24 "CourseAdviser" in roles or\ 25 "CourseAdvisers" in member.getGroups() or\ 26 "ClearanceOfficers" in member.getGroups() 18 member_id = str(member) 19 for c in member_id: 20 is_student = True 21 if c not in ('0123456789'): 22 is_student = False 23 break 24 return not (is_student and len(member_id) == 7) -
WAeUP_SRP/trunk/skins/waeup_default/isStudent.py
r1077 r1957 11 11 12 12 member_id = str(context.portal_membership.getAuthenticatedMember()) 13 if len(member_id) != 7: 14 return False 15 try: 16 int(member_id[1:]) 17 return True 18 except: 19 return False 13 #from Products.zdb import set_trace;set_trace() 14 # if len(member_id) != 7: 15 # return False 16 # try: 17 # int(member_id[1:]) 18 # return True 19 # except: 20 # return False 21 for c in member_id: 22 is_student = True 23 if c not in ('0123456789'): 24 is_student = False 25 break 26 return is_student and len(member_id) == 7
Note: See TracChangeset for help on using the changeset viewer.