summaryrefslogtreecommitdiff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-06-28 13:46:47 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-06-28 13:46:47 +0800
commit95c99cd4fd0f768394d582ac49dc83ac93d9c1e5 (patch)
treee6d97d4d3671b41ac60ad2245b6d00319ab43d7e /app/controllers/admin
parentc9a46263336dd38aef90b71995e2790be72d441d (diff)
downloadgitlab-ce-95c99cd4fd0f768394d582ac49dc83ac93d9c1e5.tar.gz
Admin should be able to turn shared runners into specific ones:
The regression was introduced by: https://gitlab.com/gitlab-org/gitlab-ce/commit/1b8f52d9206bdf19c0dde04505c4c0b1cf46cfbe I did that because there's a test specifying that a shared runner cannot be enabled, in the API. So I assume that is the case for non-admin, but admins should be able to do so anyway. Also added a test to make sure this won't regress again. Closes #19039
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/runner_projects_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/runner_projects_controller.rb b/app/controllers/admin/runner_projects_controller.rb
index bf20c5305a7..5de06b4ad14 100644
--- a/app/controllers/admin/runner_projects_controller.rb
+++ b/app/controllers/admin/runner_projects_controller.rb
@@ -4,7 +4,7 @@ class Admin::RunnerProjectsController < Admin::ApplicationController
def create
@runner = Ci::Runner.find(params[:runner_project][:runner_id])
- return head(403) if @runner.is_shared? || @runner.locked?
+ return head(403) if @runner.locked?
runner_project = @runner.assign_to(@project, current_user)