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 | |
---|
12 | mtool = context.portal_membership |
---|
13 | member = mtool.getAuthenticatedMember() |
---|
14 | roles = member.getRolesInContext(context) |
---|
15 | |
---|
16 | return "Manager" in roles or\ |
---|
17 | "SectionManager" in roles or\ |
---|
18 | "SectionOfficer" in roles or\ |
---|
19 | "ClearanceOfficer" in roles or\ |
---|
20 | "ClearanceOfficers" in member.getGroups() |
---|
Note: See
TracBrowser for help on using the repository browser.