Last change
on this file since 1019 was
924,
checked in by joachim, 18 years ago
|
removed username from member_search mask, because there is no easy way to
not search for student-members. In my opinion search for firstname, lastname
and email is sufficient.
The local-role SectionReader? is set for Authenticated in exportimport.py,
but now the import takes 3 times as long. I think we have to remove this
setting from exportimport.
|
-
Property svn:keywords set to
Id
|
File size:
719 bytes
|
Rev | Line | |
---|
[319] | 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 | ## |
---|
[486] | 10 | # $Id: getCPSCandidateLocalRoles.py 924 2006-11-22 16:54:23Z joachim $ |
---|
[319] | 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') |
---|
[919] | 19 | member = mtool.getAuthenticatedMember() |
---|
| 20 | |
---|
| 21 | |
---|
[924] | 22 | allowed_roles = mtool.getCPSCandidateLocalRoles(context) |
---|
[919] | 23 | |
---|
| 24 | |
---|
[924] | 25 | if member.id in ("admin","perry"): |
---|
| 26 | return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer'] |
---|
[919] | 27 | return ['ClearanceOfficer', 'SectionOfficer'] |
---|
Note: See
TracBrowser for help on using the repository browser.