diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-06-28 14:54:18 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-06-28 14:54:18 +0300 |
commit | b5c8d58afb7840acd9c26129b2ff0c0fe3f2586e (patch) | |
tree | f10d418965304dacd4af33030f4fceab74d5a274 | |
parent | d08777b1a4ead4cc15089e9d0d333d91de56ee1e (diff) |
Use 409 to indicate that interface might be outdated
Because invalid actions shouldn't be shown on the page.
-rw-r--r-- | app/controllers/projects/runner_projects_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/projects/runner_projects_controller.rb b/app/controllers/projects/runner_projects_controller.rb index dc1a18f8d42..dc825557928 100644 --- a/app/controllers/projects/runner_projects_controller.rb +++ b/app/controllers/projects/runner_projects_controller.rb @@ -6,8 +6,8 @@ class Projects::RunnerProjectsController < Projects::ApplicationController def create @runner = Ci::Runner.find(params[:runner_project][:runner_id]) - return head(403) if @runner.is_shared? || @runner.locked? - return head(403) unless current_user.ci_authorized_runners.include?(@runner) + return head(409) if @runner.is_shared? || @runner.locked? + return head(409) unless current_user.ci_authorized_runners.include?(@runner) path = runners_path(project) runner_project = @runner.assign_to(project, current_user) |