diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-04 18:07:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-04 18:07:36 +0300 |
commit | aa542224bb345acf0cb9a1a606f0a802c16b0336 (patch) | |
tree | 496540a29aec55c6faeec7b0140824547046ae6c /app/models/container_repository.rb | |
parent | 2494b608a460c46c759ad84bb29e6cc3447499a1 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/container_repository.rb')
-rw-r--r-- | app/models/container_repository.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb index 7a3a79cead0..152aa7b3218 100644 --- a/app/models/container_repository.rb +++ b/app/models/container_repository.rb @@ -12,6 +12,9 @@ class ContainerRepository < ApplicationRecord scope :ordered, -> { order(:name) } scope :with_api_entity_associations, -> { preload(project: [:route, { namespace: :route }]) } + scope :for_group_and_its_subgroups, ->(group) do + where(project_id: Project.for_group_and_its_subgroups(group).with_container_registry.select(:id)) + end # rubocop: disable CodeReuse/ServiceClass def registry |