Merge pull request #243 from foodcoop-rostock/fix-access-denied-cycle
Redirect to home page on denied access (fixes #237).
This commit is contained in:
commit
933f4fe67a
3 changed files with 5 additions and 3 deletions
|
|
@ -26,7 +26,7 @@ class ApplicationController < ActionController::Base
|
|||
|
||||
def deny_access
|
||||
session[:return_to] = request.original_url
|
||||
redirect_to login_url, :alert => I18n.t('application.controller.error_denied')
|
||||
redirect_to root_url, alert: I18n.t('application.controller.error_denied', sign_in: ActionController::Base.helpers.link_to(t('application.controller.error_denied_sign_in'), login_path))
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue