## Script (Python) "tm_team_add_membership"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=Get Roles Available to a Team Member

local_roles = context.portal_membership.getCandidateLocalRoles( context )
return [lr for lr in local_roles if lr in context.getAllowedTeamRoles()]

