add missing i18n
This commit is contained in:
parent
1d8fefcfb7
commit
a8ace3bc79
3 changed files with 13 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 => 'Access denied!'
|
||||
redirect_to login_url, :alert => I18n.t('application.controller.error_denied')
|
||||
end
|
||||
|
||||
private
|
||||
|
|
@ -37,7 +37,7 @@ class ApplicationController < ActionController::Base
|
|||
# No user at all: redirect to login page.
|
||||
session[:user_id] = nil
|
||||
session[:return_to] = request.original_url
|
||||
redirect_to login_url, :alert => 'Authentication required!'
|
||||
redirect_to login_url, :alert => I18n.t('application.controller.error_authn')
|
||||
else
|
||||
# We have an authenticated user, now check role...
|
||||
# Roles gets the user through his memberships.
|
||||
|
|
@ -83,7 +83,7 @@ class ApplicationController < ActionController::Base
|
|||
def authenticate_membership_or_admin
|
||||
@group = Group.find(params[:id])
|
||||
unless @group.member?(@current_user) or @current_user.role_admin?
|
||||
redirect_to root_path, alert: "Diese Aktion ist nur für Mitglieder der Gruppe erlaubt!"
|
||||
redirect_to root_path, alert: I18n.t('application.controller.error_members_only')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue