Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rule_type.rb « protection « container_registry « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b80439b4de24a41897f6c60d157bc5f4b1f8166b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# frozen_string_literal: true

module Types
  module ContainerRegistry
    module Protection
      class RuleType < ::Types::BaseObject
        graphql_name 'ContainerRegistryProtectionRule'
        description 'A container registry protection rule designed to prevent users with a certain ' \
                    'access level or lower from altering the container registry.'

        authorize :admin_container_image

        field :id,
          ::Types::GlobalIDType[::ContainerRegistry::Protection::Rule],
          null: false,
          description: 'ID of the container registry protection rule.'

        field :repository_path_pattern,
          GraphQL::Types::String,
          null: false,
          description:
            'Container repository path pattern protected by the protection rule. ' \
            'For example `my-project/my-container-*`. Wildcard character `*` allowed.'

        field :push_protected_up_to_access_level,
          Types::ContainerRegistry::Protection::RuleAccessLevelEnum,
          null: false,
          description:
            'Max GitLab access level to prevent from pushing container images to the container registry. ' \
            'For example `DEVELOPER`, `MAINTAINER`, `OWNER`.'

        field :delete_protected_up_to_access_level,
          Types::ContainerRegistry::Protection::RuleAccessLevelEnum,
          null: false,
          description:
            'Max GitLab access level to prevent from pushing container images to the container registry. ' \
            'For example `DEVELOPER`, `MAINTAINER`, `OWNER`.'
      end
    end
  end
end