source: WAeUP_SRP/trunk/skins/waeup_default/isCourseAdviser.py @ 11884

Last change on this file since 11884 was 1959, checked in by joachim, 17 years ago

faster method to detect isStudent

File size: 517 bytes
RevLine 
[1562]1## Script (Python) "isCourseAdviser"
[1513]2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=
8##title=
9##
10# $Id: isClearanceOfficer.py 1087 2006-12-18 22:13:31Z joachim $
[1957]11member = context.portal_membership.getAuthenticatedMember()
12member_id = str(member)
[1959]13o = ord(member_id[1])
14if o >= 48 and o <= 57:
[1513]15    return False
[1957]16# if context.isStudent():
17#     return False
18roles = member.getRolesInContext(context)
[1515]19return "CourseAdviser" in roles
20
Note: See TracBrowser for help on using the repository browser.