I have this for my before_filters in a controller
before_filter :authorize_company_or_admin, :except => [ :index,
:list, :show, :display_meetings ]
before_filter :authorize_admin, :only => [ :index, :list, :show ]
the :authorize_company_or_admin isn’t working. If I do the action
show_meeting, it lets the user right through. However, if I change it
before_filter :authorize_company_or_admin, :only => [ :show_meeting ]
Then it stops the user. The logic in the action is definitely legit,
so it’s not that.
The other problem I have, is that :authorize_company_or_admin does a
redirect if the user is not allowed to access something. However, all
of my actions in the other controllers render partials. So if a user
isn’t authorized to access something, both the redirect and render
partial get called, and I get the “Render and/or redirect were called
multiple times” error. How can this be avoided?
Thanks in advance!!!