From c3f9d80a6e0950361e056ded4107015d3923f56d Mon Sep 17 00:00:00 2001 From: Dylan Griffith Date: Thu, 10 May 2018 14:42:55 +0200 Subject: Rename User#ci_authorized_runners -> ci_owned_runners --- app/policies/ci/runner_policy.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'app/policies') diff --git a/app/policies/ci/runner_policy.rb b/app/policies/ci/runner_policy.rb index 82d8e86ae05..61912696e88 100644 --- a/app/policies/ci/runner_policy.rb +++ b/app/policies/ci/runner_policy.rb @@ -3,14 +3,14 @@ module Ci with_options scope: :subject, score: 0 condition(:locked, scope: :subject) { @subject.locked? } - condition(:authorized_runner) { @user.ci_authorized_runners.exists?(@subject.id) } + condition(:owned_runner) { @user.ci_owned_runners.exists?(@subject.id) } rule { anonymous }.prevent_all - rule { admin | authorized_runner }.enable :assign_runner - rule { admin | authorized_runner }.enable :read_runner - rule { admin | authorized_runner }.enable :update_runner - rule { admin | authorized_runner }.enable :delete_runner - rule { admin | authorized_runner }.enable :list_runner_jobs + rule { admin | owned_runner }.enable :assign_runner + rule { admin | owned_runner }.enable :read_runner + rule { admin | owned_runner }.enable :update_runner + rule { admin | owned_runner }.enable :delete_runner + rule { admin | owned_runner }.enable :list_runner_jobs rule { ~admin & locked }.prevent :assign_runner end end -- cgit v1.2.1