## Script (Python) "getCPSCandidateLocalRoles" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters= ##title= ## # $Id: getCPSCandidateLocalRoles.py 1028 2006-12-11 15:32:32Z henrik $ """ XXX content moved into portal_membership Override this template if you have new portal types or new roles with a specific mapping to register. """ from Products.CMFCore.utils import getToolByName mtool = getToolByName(context, 'portal_membership') member = mtool.getAuthenticatedMember() allowed_roles = mtool.getCPSCandidateLocalRoles(context) if member.id in ("admin","perry"): return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer'] return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer']