redirect to root_path if you get a 403
This commit is contained in:
parent
dc55bae243
commit
129e3db946
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
def handle_unauthorized
|
def handle_unauthorized
|
||||||
if authenticated?
|
if authenticated?
|
||||||
head :forbidden # TODO: make this better
|
redirect_to root_path, notice: "You don't have permission to see that page."
|
||||||
else
|
else
|
||||||
redirect_to new_user_session_path, notice: 'Try signing in to do that.'
|
redirect_to new_user_session_path, notice: 'Try signing in to do that.'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue