Ruby on Rails Monday, August 12, 2013

I have a project model which I'd like to set the default_scope to filter
out projects where the user doesn't have permission to view them.

Think something along the lines of the projects having a list of teams
and companies that the user must be in to access the data.

default_scope seems to work well if I hard code it as I really don't
want a dev to accidentally not have these permissions filters in use.
The lists of teams and companies a user is in is stored in the session.

How can I marry these up? Thanks in advance.

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a465d7954011631c9cfeb3e30f9eb1bb%40ruby-forum.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment