diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2025-03-07 07:42:59 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2025-03-07 07:42:59 +0000 |
commit | 37e39a267412cb19713d9ba433663ad054d4b55b (patch) | |
tree | 1b3454e99e8f2898e64ef9862224664c13a9cb58 | |
parent | 01557f9fc657b570e7e2eaf3cefb3dae009db0ad (diff) | |
download | redmine-37e39a267412cb19713d9ba433663ad054d4b55b.tar.gz redmine-37e39a267412cb19713d9ba433663ad054d4b55b.zip |
Merged r23520 from trunk to 6.0-stable (#42194).
git-svn-id: https://svn.redmine.org/redmine/branches/6.0-stable@23525 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/sudo_mode.rb | 2 | ||||
-rw-r--r-- | test/integration/sudo_mode_test.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/redmine/sudo_mode.rb b/lib/redmine/sudo_mode.rb index 39daaeeed..806d06788 100644 --- a/lib/redmine/sudo_mode.rb +++ b/lib/redmine/sudo_mode.rb @@ -153,7 +153,7 @@ module Redmine # Before Filter which is used by the require_sudo_mode class method. class SudoRequestFilter < Struct.new(:parameters, :request_methods) def before(controller) - method_matches = request_methods.blank? || request_methods.include?(controller.request.method_symbol) + method_matches = request_methods.blank? || request_methods.include?(controller.request.request_method_symbol) if controller.api_request? true elsif SudoMode.possible? && method_matches diff --git a/test/integration/sudo_mode_test.rb b/test/integration/sudo_mode_test.rb index 228e527ed..9fbbfd725 100644 --- a/test/integration/sudo_mode_test.rb +++ b/test/integration/sudo_mode_test.rb @@ -190,7 +190,7 @@ class SudoModeTest < Redmine::IntegrationTest expire_sudo_mode! get '/my/account' assert_response :success - put('/my/account', :params => {:user => {:mail => 'newmail@test.com'}}) + post('/my/account', :params => {:_method => 'put', :user => {:mail => 'newmail@test.com'}}) assert_response :success assert_select 'h2', 'Confirm your password to continue' assert_select 'form[action="/my/account"]' |