summaryrefslogtreecommitdiff
path: root/app/graphql/types/container_repository_details_type.rb
blob: 1a9f57e701f8a328a64d7b8c57b3a5d5054fb58d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Types
  class ContainerRepositoryDetailsType < Types::ContainerRepositoryType
    graphql_name 'ContainerRepositoryDetails'

    description 'Details of a container repository'

    authorize :read_container_image

    field :tags,
          Types::ContainerRepositoryTagType.connection_type,
          null: true,
          description: 'Tags of the container repository.',
          max_page_size: 20

    def can_delete
      Ability.allowed?(current_user, :destroy_container_image, object)
    end
  end
end