Added error messages translations to white ips

This commit is contained in:
Sergei Tsoganov 2023-07-04 11:33:06 +03:00
parent 289159bff2
commit 97c11f5dfd
7 changed files with 161 additions and 50 deletions

View file

@ -5,6 +5,7 @@ module Repp
around_action :log_request
before_action :authenticate_user
before_action :set_locale
before_action :validate_webclient_ca
before_action :validate_client_certs
before_action :check_ip_restriction
@ -176,6 +177,10 @@ module Repp
authorize!(:throttled_user, @domain) unless current_user || action_name == 'tara_callback'
current_user
end
def set_locale
I18n.locale = current_user&.try(:locale) || params[:locale] || I18n.default_locale
end
end
end
end