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
|
def deny_access
|
||||||
session[:return_to] = request.original_url
|
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
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -274,7 +274,8 @@ de:
|
||||||
application:
|
application:
|
||||||
controller:
|
controller:
|
||||||
error_authn: Anmeldung erforderlich!
|
error_authn: Anmeldung erforderlich!
|
||||||
error_denied: Kein Zugriff!
|
error_denied: Du darfst die gewünschte Seite nicht sehen. Wenn Du denkst, dass Du dürfen solltest, frage eine Administratorin, dass sie Dir die entsprechenden Rechte einräumt. Falls Du Zugang zu mehreren Benutzerkonten hast, möchtest Du Dich vielleicht %{sign_in}.
|
||||||
|
error_denied_sign_in: als ein anderer Benutzer anmelden
|
||||||
error_members_only: Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!
|
error_members_only: Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!
|
||||||
article_categories:
|
article_categories:
|
||||||
create:
|
create:
|
||||||
|
|
|
@ -274,7 +274,8 @@ en:
|
||||||
application:
|
application:
|
||||||
controller:
|
controller:
|
||||||
error_authn: Authentication required!
|
error_authn: Authentication required!
|
||||||
error_denied: Access denied!
|
error_denied: You are not allowed to view the requested page. If you think you should, ask an administrator to give you appropriate permissions. If you have access to multiple user accounts, you might want to %{sign_in}.
|
||||||
|
error_denied_sign_in: sign in as another user
|
||||||
error_members_only: This action is only available to members of the group!
|
error_members_only: This action is only available to members of the group!
|
||||||
article_categories:
|
article_categories:
|
||||||
create:
|
create:
|
||||||
|
|
Loading…
Reference in a new issue