def permitted_actions(self, user, obj=None):
try:<EOL><INDENT>if not self._obj_ok(obj):<EOL><INDENT>raise InvalidPermissionObjectException<EOL><DEDENT>return user.permset_tree.permitted_actions(obj)<EOL><DEDENT>except ObjectDoesNotExist:<EOL><INDENT>return []<EOL><DEDENT>
Determine list of permitted actions for an object or object
        pattern.

        :param user: The user to test.
        :type user: ``User``
        :param obj: A function mapping from action names to object
                    paths to test.
        :type obj: callable
        :returns: ``list(tutelary.engine.Action)`` -- permitted actions.