Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
halloffame opened this issue Dec 12, 2012 · 0 comments

Comments

@halloffame
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant