Hi--
I'm having a little problem with getting this up and running.
I'm using authlogic for authentication, and I believe that I have
everything set up correctly for providing a current_user object.
After I login to my application, I put a
permit "developers"
line at the top of my controller.
Regardless of whether the logged in user has that role or not, I
always get a redirect with the default message of "Login is required
to access the requested page."
I've tried being more explicit by saying
permit "developers", :user => @current_user
That doesn't seem to help either, same message.
I tried throwing in some logging to see if the current_user object is
set, and it indeed is set.
before_filter :log_user
permit "developers", :user => @current_user
def log_user
logger.info current_user.inspect
logger.info @current_user.inspect
end
I then tried explicitly setting some options;
permit "developers", {
:user => @current_user,
:permission_denied_redirection => '/teams',
:permission_denied_message => 'denied access',
:login_required_redirection => '/users',
:login_required_message => 'not logged in'}
The flash message displayed is 'not logged in'
What am I missing? Any ideas?
Thanks--