Last change
on this file since 1866 was
1737,
checked in by Henrik Bettermann, 18 years ago
|
merging with CPSSkinsless branch
In ZMI:
- delete all portlets in .cps_portlets
- delete all portlets in portal_cpsportlets
- import Portlet Tool, Skins Tool and Themes Tool
- optionally: - delete all themes in portal_themes and delete all method themes in portal_themes
|
File size:
678 bytes
|
Rev | Line | |
---|
[879] | 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 | |
---|
[1077] | 12 | if context.portal_membership.isAnonymousUser(): |
---|
| 13 | return False |
---|
| 14 | return not context.isStudent() |
---|
| 15 | |
---|
[879] | 16 | mtool = context.portal_membership |
---|
[885] | 17 | member = mtool.getAuthenticatedMember() |
---|
| 18 | roles = member.getRolesInContext(context) |
---|
[879] | 19 | |
---|
[903] | 20 | return "Manager" in roles or\ |
---|
| 21 | "SectionManager" in roles or\ |
---|
[911] | 22 | "SectionOfficer" in roles or\ |
---|
[885] | 23 | "ClearanceOfficer" in roles or\ |
---|
[1737] | 24 | "CourseAdviser" in roles or\ |
---|
| 25 | "CourseAdvisers" in member.getGroups() or\ |
---|
[885] | 26 | "ClearanceOfficers" in member.getGroups() |
---|
Note: See
TracBrowser for help on using the repository browser.