I want to substitute my own login screen to the user so that upon a
failed page access the user doesn't get redirected to the admin/login
screen. I don't want the user to see the radiant backend. To do so,
and it works, I overrode the LoginSystem in the following fashion:
module LoginSystem
protected
def authenticate
action = params['action'].to_s.intern
if no_login_required? or (current_user and
user_has_access_to_action?(action))
true
else
if current_user
permissions =
self.class.controller_permissions[self.class][action]
flash[:error] = permissions[:denied_message] || 'Access
denied.'
redirect_to permissions[:denied_url] || { :action => :index }
else
redirect_to user_login_url #changed from login_url
end
false
end
end
end
I hate to copy and override a complete method when only one line change
is necessary. I simply want the login_url to redirect to 'user/login'
rather than 'admin/login'. I tried overriding the routes in several
ways without any luck. Is this a rather simple change someone might
know off the top of their head?
Thanks.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
Radiant mailing list
Post: [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site: http://lists.radiantcms.org/mailman/listinfo/radiant