@register('role')
def _check_role(brain, match_kind, match, target_dict, cred_dict):
 return (match.lower() in [x.lower() for x in cred_dict['roles']])

@ register ( 'role' ) def _check_role ( brain , match_kind , match , target_dict , cred_dict ) : return ( match . lower ( ) in [ x . lower ( ) for x in cred_dict [ 'roles' ] ] )
check that there is a matching role in the cred dict .