source: WAeUP_SRP/base/skins/waeup_default/isCourseAdviser.py @ 3342

Last change on this file since 3342 was 1959, checked in by joachim, 18 years ago

faster method to detect isStudent

File size: 517 bytes
Line 
1## Script (Python) "isCourseAdviser"
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 $
11member = context.portal_membership.getAuthenticatedMember()
12member_id = str(member)
13o = ord(member_id[1])
14if o >= 48 and o <= 57:
15    return False
16# if context.isStudent():
17#     return False
18roles = member.getRolesInContext(context)
19return "CourseAdviser" in roles
20
Note: See TracBrowser for help on using the repository browser.