Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Ensure before_actions are executed for settings writers

Oliver Günther47d4bdd03684
diff --git a/app/controllers/authentication_controller.rb b/app/controllers/authentication_controller.rb
index f3bb25bddf5..0dc527c7868 100644
--- a/app/controllers/authentication_controller.rb
+++ b/app/controllers/authentication_controller.rb
@@ -28,7 +28,7 @@
#++
class AuthenticationController < ApplicationController
- before_action :require_login
+ before_action :require_admin
layout 'admin'
menu_item :authentication_settings
diff --git a/app/controllers/users_settings_controller.rb b/app/controllers/users_settings_controller.rb
index 3160a7c7fab..9e1c20ee9b2 100644
--- a/app/controllers/users_settings_controller.rb
+++ b/app/controllers/users_settings_controller.rb
@@ -30,6 +30,7 @@
class UsersSettingsController < ::ApplicationController
layout 'admin'
+ before_action :require_admin
menu_item :user_settings
def index
diff --git a/app/controllers/work_packages/settings_controller.rb b/app/controllers/work_packages/settings_controller.rb
index 07282151fa4..8e6d7edcc34 100644
--- a/app/controllers/work_packages/settings_controller.rb
+++ b/app/controllers/work_packages/settings_controller.rb
@@ -30,6 +30,7 @@
class WorkPackages::SettingsController < ::ApplicationController
layout 'admin'
+ before_action :require_admin
current_menu_item :index do
:work_packages_setting
end