|
Last change
on this file since 17841 was
2217,
checked in by Henrik Bettermann, 19 years ago
|
|
move content from waeup_custom to cps_custom
|
|
File size:
834 bytes
|
| Line | |
|---|
| 1 | ## Script (Python) "getCPSCandidateLocalRoles" |
|---|
| 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: getCPSCandidateLocalRoles.py 1515 2007-03-03 11:45:58Z henrik $ |
|---|
| 11 | """ |
|---|
| 12 | XXX content moved into portal_membership |
|---|
| 13 | |
|---|
| 14 | Override this template if you have new portal types or new roles with a |
|---|
| 15 | specific mapping to register. |
|---|
| 16 | """ |
|---|
| 17 | from Products.CMFCore.utils import getToolByName |
|---|
| 18 | mtool = getToolByName(context, 'portal_membership') |
|---|
| 19 | member = mtool.getAuthenticatedMember() |
|---|
| 20 | |
|---|
| 21 | |
|---|
| 22 | allowed_roles = mtool.getCPSCandidateLocalRoles(context) |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | if member.id in ("admin","perry"): |
|---|
| 26 | return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer', 'CourseAdviser'] |
|---|
| 27 | return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer', 'CourseAdviser'] |
|---|
Note: See
TracBrowser for help on using the repository browser.