source: WAeUP_SRP/trunk/skins/waeup_custom/getCPSCandidateLocalRoles.py @ 1790

Last change on this file since 1790 was 1515, checked in by Henrik Bettermann, 18 years ago

CouseAdviser? role modifications

  • Property svn:keywords set to Id
File size: 770 bytes
RevLine 
[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 1515 2007-03-03 11:45:58Z henrik $
[319]11"""
12XXX content moved into portal_membership
13
14Override this template if you have new portal types or new roles with a
15specific mapping to register.
16"""
17from Products.CMFCore.utils import getToolByName
18mtool = getToolByName(context, 'portal_membership')
[919]19member = mtool.getAuthenticatedMember()
20
21
[924]22allowed_roles = mtool.getCPSCandidateLocalRoles(context)
[919]23
24
[924]25if member.id in ("admin","perry"):
[1515]26    return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
27return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
Note: See TracBrowser for help on using the repository browser.