Last change
on this file since 892 was
885,
checked in by joachim, 18 years ago
|
cleaned up several things:
- the definitions for isManager, isStaff, and isClearanceOfficer
are now independant from eachother only based on roles or groups.
The Manager-Role is the superuser-role,
the is-Scripts document what is what.
since isStaff returns false if the member only has Manager-role,
in .cpsskins_theme it must now be:
if context.isStaff() or context.isManager():
return 'WAeUP_Backoffice'
todo: finish the merge of co_searchStudents and searchStudents
|
File size:
428 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 | |
---|
12 | mtool = context.portal_membership |
---|
13 | member = mtool.getAuthenticatedMember() |
---|
14 | roles = member.getRolesInContext(context) |
---|
15 | |
---|
16 | return "SectionManager" in roles or\ |
---|
17 | "ClearanceOfficer" in roles or\ |
---|
18 | "ClearanceOfficers" in member.getGroups() |
---|
Note: See
TracBrowser for help on using the repository browser.