'When getting permitted actions from an untrusted source like a
form, ensure that they match our actual permitted actions.'

def convert_permitted_action_strings(self, permitted_action_strings):

    return filter((lambda x: (x is not None)), [self.permitted_actions.get(action_string) for action_string in permitted_action_strings])
