diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/controllers/application_controller.rb | 2 | ||||
| -rw-r--r-- | app/controllers/errors_controller.rb | 2 | ||||
| -rw-r--r-- | app/views/errors/forbidden.html.slim (renamed from app/views/errors/not_allowed.html.slim) | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2bdf8078a..f2c9b4c6f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -22,7 +22,7 @@ class ApplicationController < ActionController::Base protected def user_not_authorized - render :file => "#{Rails.root}/public/403.html", :status => :forbidden, :layout => false + redirect_to forbidden_path end def current_organisation diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb index 94e0d7b4c..252b8fdfa 100644 --- a/app/controllers/errors_controller.rb +++ b/app/controllers/errors_controller.rb @@ -7,7 +7,7 @@ class ErrorsController < ApplicationController render status: 500 end - def not_allowed + def forbidden render status: 403 end end diff --git a/app/views/errors/not_allowed.html.slim b/app/views/errors/forbidden.html.slim index 6c94328cc..4ca3a6dbf 100644 --- a/app/views/errors/not_allowed.html.slim +++ b/app/views/errors/forbidden.html.slim @@ -11,11 +11,11 @@ - if I18n.locale == :fr p strong = "Désolé, la page demandée la page n'est pas accessible avec votre profil utilisateur." - + p = "Vous pouvez néanmoins continuer à utiliser l'application IBOO." - + - else p strong = "You are not allowed to access the page you were looking for." - + p = "You can still continue the use the IBOO application. Thank you for understanding." |
