source: WAeUP_SRP/trunk/skins/waeup_default/isSectionOfficer.py @ 4186

Last change on this file since 4186 was 1975, checked in by Henrik Bettermann, 17 years ago

fixed

File size: 587 bytes
RevLine 
[1975]1## Script (Python) "isSectionOfficer"
[911]2##bind container=container
3##bind context=context
4##bind namespace=
5##bind script=script
6##bind subpath=traverse_subpath
7##parameters=student=None
8##title=
9##
10# $Id: isManager.py 888 2006-11-17 21:28:48Z henrik $
11
[1957]12member = context.portal_membership.getAuthenticatedMember()
13member_id = str(member)
[1972]14o = ord(member_id[1])
[1959]15if o >= 48 and o <= 57:
[1077]16    return False
[1957]17# if context.isStudent():
18#     return False
19roles = member.getRolesInContext(context)
[1077]20return "SectionOfficer" in roles or\
21       "SectionManager" in roles or\
[1972]22       "Manager" in roles
23
Note: See TracBrowser for help on using the repository browser.