diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e6c9a7c..2dff10a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Fixed - pagy overflow bug +- styles for admin pages ## [2.0.2] - 2024-12-06 ### Added diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb index 85bd55b1..f8151353 100644 --- a/app/controllers/admin/base_controller.rb +++ b/app/controllers/admin/base_controller.rb @@ -12,7 +12,7 @@ class BaseController < ApplicationController def authorize_admin return if current_user.admin? - access_denied + redirect_to forbidden_path end end end diff --git a/app/controllers/web/errors_controller.rb b/app/controllers/web/errors_controller.rb index 41d0c634..5f4876f9 100644 --- a/app/controllers/web/errors_controller.rb +++ b/app/controllers/web/errors_controller.rb @@ -5,5 +5,7 @@ class ErrorsController < ApplicationController skip_before_action :authenticate def internal; end + + def forbidden; end end end diff --git a/app/views/components/page_wrappers/admin_component.html.erb b/app/views/components/page_wrappers/admin_component.html.erb index 37e79b08..7636f953 100644 --- a/app/views/components/page_wrappers/admin_component.html.erb +++ b/app/views/components/page_wrappers/admin_component.html.erb @@ -1,9 +1,7 @@
Access denied