diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-10 12:09:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-10-10 12:09:04 +0300 |
commit | c1d4ac251994b4463fb0cfcc263af26ded0d8eac (patch) | |
tree | 94877c6e5f48787924e94b8d1282a73d20e29063 /app/policies/ci | |
parent | 699bb48edac9e8536ab5eb1ecdf6cfb0ce11d379 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies/ci')
-rw-r--r-- | app/policies/ci/runner_policy.rb | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/app/policies/ci/runner_policy.rb b/app/policies/ci/runner_policy.rb index a52dac446ea..1c23b367489 100644 --- a/app/policies/ci/runner_policy.rb +++ b/app/policies/ci/runner_policy.rb @@ -20,8 +20,8 @@ module Ci end with_options scope: :user, score: 5 - condition(:any_developer_groups_inheriting_shared_runners) do - @user.developer_groups.with_shared_runners_enabled.any? + condition(:any_developer_maintainer_owned_groups_inheriting_shared_runners) do + @user.developer_maintainer_owned_groups.with_shared_runners_enabled.any? end with_options scope: :user, score: 5 @@ -31,7 +31,7 @@ module Ci with_options score: 10 condition(:any_associated_projects_in_group_runner_inheriting_group_runners) do - # Check if any projects where user is a developer are inheriting group runners + # Check if any projects where user is a developer+ are inheriting group runners @subject.groups&.any? do |group| group.all_projects .with_group_runners_enabled @@ -48,13 +48,10 @@ module Ci rule { admin | owned_runner }.policy do enable :read_builds - end - - rule { admin | owned_runner }.policy do enable :read_runner end - rule { is_instance_runner & any_developer_groups_inheriting_shared_runners }.policy do + rule { is_instance_runner & any_developer_maintainer_owned_groups_inheriting_shared_runners }.policy do enable :read_runner end |