summaryrefslogtreecommitdiffstats
path: root/app/controllers/repositories_controller.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-03-10 03:26:23 +0000
committerGo MAEDA <maeda@farend.jp>2020-03-10 03:26:23 +0000
commit463e8163fc7edfea8319d7635866cc1f8d68b6ad (patch)
tree0711dc718dfba7b4a7a46ea97cd71173ca6e9bf1 /app/controllers/repositories_controller.rb
parent852290edb01a5193d0d638007bfd48ef5b8a5c14 (diff)
downloadredmine-463e8163fc7edfea8319d7635866cc1f8d68b6ad.tar.gz
redmine-463e8163fc7edfea8319d7635866cc1f8d68b6ad.zip
Require sudo mode for actions to delete contents (#33071).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@19569 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/repositories_controller.rb')
-rw-r--r--app/controllers/repositories_controller.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 0da256953..81fe6c5a7 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -36,6 +36,8 @@ class RepositoriesController < ApplicationController
before_action :authorize
accept_rss_auth :revisions
+ require_sudo_mode :destroy
+
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
def new