BigW Consortium Gitlab

Commit b5c8d58a by Lin Jen-Shin

Use 409 to indicate that interface might be outdated

Because invalid actions shouldn't be shown on the page.
parent d08777b1
...@@ -6,8 +6,8 @@ class Projects::RunnerProjectsController < Projects::ApplicationController ...@@ -6,8 +6,8 @@ class Projects::RunnerProjectsController < Projects::ApplicationController
def create def create
@runner = Ci::Runner.find(params[:runner_project][:runner_id]) @runner = Ci::Runner.find(params[:runner_project][:runner_id])
return head(403) if @runner.is_shared? || @runner.locked? return head(409) if @runner.is_shared? || @runner.locked?
return head(403) unless current_user.ci_authorized_runners.include?(@runner) return head(409) unless current_user.ci_authorized_runners.include?(@runner)
path = runners_path(project) path = runners_path(project)
runner_project = @runner.assign_to(project, current_user) runner_project = @runner.assign_to(project, current_user)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment