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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
attempt to focus on explicitly allowing no_authorization_required!
ulferts088329d5086c
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rbindex 12e7243cb5d..7c977c1fd01 100644--- a/app/controllers/account_controller.rb+++ b/app/controllers/account_controller.rb@@ -36,7 +36,19 @@ class AccountController < ApplicationController# prevents login action to be filtered by check_if_login_required application scope filterskip_before_action :check_if_login_required- no_authorization_required!+ no_authorization_required! only: %i[login+ internal_login+ logout+ lost_password+ register+ activate+ consent+ confirm_consent+ decline_consent+ stage_success+ stage_failure+ change_password+ auth_source_sso_failed]before_action :apply_csp_appends, only: %i[login]before_action :disable_apidiff --git a/app/controllers/angular_controller.rb b/app/controllers/angular_controller.rbindex 8697a2fb39a..dc70f86e0c8 100644--- a/app/controllers/angular_controller.rb+++ b/app/controllers/angular_controller.rb@@ -29,7 +29,7 @@class AngularController < ApplicationControllerbefore_action :require_login- no_authorization_required!+ no_authorization_required! only: %i[empty_layout notifications_layout]def empty_layout# Frontend will handle renderingdiff --git a/app/controllers/oauth/auth_base_controller.rb b/app/controllers/oauth/auth_base_controller.rbindex 89a6b5f88fe..d2b703007a6 100644--- a/app/controllers/oauth/auth_base_controller.rb+++ b/app/controllers/oauth/auth_base_controller.rb@@ -37,7 +37,9 @@ module OAuthprepend_before_action :extend_content_security_policyskip_before_action :check_if_login_required- no_authorization_required!+ no_authorization_required! only: %i[new+ create+ show]layout "only_logo"diff --git a/modules/avatars/app/controllers/avatars/avatar_controller.rb b/modules/avatars/app/controllers/avatars/avatar_controller.rbindex a5a68b0f74e..3450061cddc 100644--- a/modules/avatars/app/controllers/avatars/avatar_controller.rb+++ b/modules/avatars/app/controllers/avatars/avatar_controller.rb@@ -3,7 +3,7 @@ module ::Avatarsbefore_action :ensure_enabledbefore_action :find_avatar- no_authorization_required!+ no_authorization_required! only: %i[show]def showsend_file @avatar.diskfile,diff --git a/modules/two_factor_authentication/app/controllers/two_factor_authentication/authentication_controller.rb b/modules/two_factor_authentication/app/controllers/two_factor_authentication/authentication_controller.rbindex fdd4dc400c7..d94aa599058 100644--- a/modules/two_factor_authentication/app/controllers/two_factor_authentication/authentication_controller.rb+++ b/modules/two_factor_authentication/app/controllers/two_factor_authentication/authentication_controller.rb@@ -11,7 +11,12 @@ module ::TwoFactorAuthentication# User is not yet logged in, so skip login required checkskip_before_action :check_if_login_required- no_authorization_required!+ no_authorization_required! only: %i[request_otp+ confirm_otp+ enter_backup_code+ verify_backup_code+ retry+ webauthn_challenge]# Avoid catch-all from core resulting in methodsbefore_action :only_post, only: :confirm_otpdiff --git a/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/remember_cookie_controller.rb b/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/remember_cookie_controller.rbindex 5be5a66ee3a..eb23b6f50ba 100644--- a/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/remember_cookie_controller.rb+++ b/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/remember_cookie_controller.rb@@ -6,7 +6,7 @@ module ::TwoFactorAuthentication# Ensure user is logged inbefore_action :require_login- no_authorization_required!+ no_authorization_required! only: :destroylayout "my"menu_item :two_factor_authenticationdiff --git a/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/two_factor_devices_controller.rb b/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/two_factor_devices_controller.rbindex 59f69f24c15..4295a95a5eb 100644--- a/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/two_factor_devices_controller.rb+++ b/modules/two_factor_authentication/app/controllers/two_factor_authentication/my/two_factor_devices_controller.rb@@ -4,9 +4,16 @@ module ::TwoFactorAuthentication# Ensure user is logged inbefore_action :require_loginbefore_action :set_user_variables- # Authorization is not handled explictly but as the user on which changes can be done is only the current user+ # Authorization is not handled explicitly but as the user on which changes can be done is only the current user# (and that user needs to be logged in), no action harmful to other users can be done.- no_authorization_required!+ no_authorization_required! only: %i[new+ index+ create+ register+ confirm+ destroy+ make_default+ webauthn_challenge]before_action :find_device, except: %i[new index register webauthn_challenge]diff --git a/spec/features/auth/login_spec.rb b/spec/features/auth/login_spec.rbindex fa3d27a7e51..882c3335fea 100644--- a/spec/features/auth/login_spec.rb+++ b/spec/features/auth/login_spec.rb@@ -109,7 +109,7 @@ RSpec.describe "Login" doendit "prevents login for a blocked user" do- user.lock!+ user.locked!login_with(user.login, user.password)