runner_policy.rb 282 Bytes EditWeb IDE 1 2 3 4 5 6 7 8 9 10 11 12 13 module Ci class RunnerPolicy < BasePolicy def rules return unless @user can! :assign_runner if @user.is_admin? return if @subject.is_shared? || @subject.locked? can! :assign_runner if @user.ci_authorized_runners.include?(@subject) end end end