Skip to content

allowed_to_visit? method may be ignoring namespacing when checking permissions for an object #2

Description

@halloffame
def allowed_to_visit?(link)
  permitted_to?(link.action, link.object)
end

In the above snippet, I'm wondering if link.object should actually be link.object_array. Because link.object is just returning the last item of the array. So is it taking into account namespaced objects?

https://github.com/biola/action_links/blob/master/lib/action_links/helpers.rb#L79

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions