source: WAeUP_SRP/branches/joachim-event-branch/skins/waeup_default/isStaff.py @ 17952

Last change on this file since 17952 was 1077, checked in by joachim, 18 years ago

files for custom

File size: 592 bytes
Line 
1## Script (Python) "isStaff"
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: $
11
12if context.portal_membership.isAnonymousUser():
13    return False
14return not context.isStudent()
15
16mtool = context.portal_membership
17member = mtool.getAuthenticatedMember()
18roles = member.getRolesInContext(context)
19
20return "Manager" in roles or\
21       "SectionManager" in roles or\
22       "SectionOfficer" in roles or\
23       "ClearanceOfficer" in roles or\
24       "ClearanceOfficers" in member.getGroups()
Note: See TracBrowser for help on using the repository browser.