summaryrefslogtreecommitdiff
path: root/app/finders/ci/runners_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/ci/runners_finder.rb')
-rw-r--r--app/finders/ci/runners_finder.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/finders/ci/runners_finder.rb b/app/finders/ci/runners_finder.rb
index 774947a35b7..d0d98a59677 100644
--- a/app/finders/ci/runners_finder.rb
+++ b/app/finders/ci/runners_finder.rb
@@ -55,6 +55,12 @@ module Ci
Ci::Runner.belonging_to_group(@group.id)
when :descendants, nil
Ci::Runner.belonging_to_group_or_project_descendants(@group.id)
+ when :all_available
+ unless can?(@current_user, :read_group_all_available_runners, @group)
+ raise Gitlab::Access::AccessDeniedError
+ end
+
+ Ci::Runner.usable_from_scope(@group)
else
raise ArgumentError, 'Invalid membership filter'
end