Changeset 1077 for WAeUP_SRP/trunk/skins/waeup_default
- Timestamp:
- 18 Dec 2006, 19:44:57 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_default
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_default/isSectionOfficer.py
r911 r1077 10 10 # $Id: isManager.py 888 2006-11-17 21:28:48Z henrik $ 11 11 12 if context.isStudent(): 13 return False 12 14 mtool = context.portal_membership 13 15 roles = mtool.getAuthenticatedMember().getRolesInContext(context) 14 return "SectionManager" in roles or\ 15 "Manager" in roles or\ 16 "SectionOfficer" in roles 16 return "SectionOfficer" in roles or\ 17 "SectionManager" in roles or\ 18 "Manager" in roles 19 -
WAeUP_SRP/trunk/skins/waeup_default/isStaff.py
r911 r1077 10 10 # $Id: $ 11 11 12 if context.portal_membership.isAnonymousUser(): 13 return False 14 return not context.isStudent() 15 12 16 mtool = context.portal_membership 13 17 member = mtool.getAuthenticatedMember() -
WAeUP_SRP/trunk/skins/waeup_default/isStudent.py
r1042 r1077 10 10 # $Id$ 11 11 12 #session = context.REQUEST.SESSION 13 #roles = member.getRolesInContext(context) 14 #return "Student" in roles 15 16 mtool = context.portal_membership 17 member = mtool.getAuthenticatedMember() 18 member_id = str(member) 19 if len(member_id) == 7: 20 try: 21 int(member_id[1:]) 22 return True 23 except: 24 return False 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
Note: See TracChangeset for help on using the changeset viewer.