Last change
on this file since 1037 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
|
-
Property svn:keywords set to
Id
|
File size:
313 bytes
|
Rev | Line | |
---|
[845] | 1 | ## Script (Python) "isStudent" |
---|
[600] | 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
[874] | 7 | ##parameters= |
---|
[600] | 8 | ##title= |
---|
| 9 | ## |
---|
[805] | 10 | # $Id: isStudent.py 885 2006-11-17 16:06:47Z joachim $ |
---|
[885] | 11 | |
---|
| 12 | mtool = context.portal_membership |
---|
| 13 | roles = mtool.getAuthenticatedMember().getRolesInContext(context) |
---|
[874] | 14 | return "Student" in roles |
---|
Note: See
TracBrowser for help on using the repository browser.