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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/ci/job_token_scope_type.rb')
-rw-r--r--app/graphql/types/ci/job_token_scope_type.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/graphql/types/ci/job_token_scope_type.rb b/app/graphql/types/ci/job_token_scope_type.rb
new file mode 100644
index 00000000000..9f48298e1d3
--- /dev/null
+++ b/app/graphql/types/ci/job_token_scope_type.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+module Types
+ # rubocop: disable Graphql/AuthorizeTypes
+ # Authorization is in the resolver based on the parent project
+ module Ci
+ class JobTokenScopeType < BaseObject
+ graphql_name 'CiJobTokenScopeType'
+
+ field :projects, Types::ProjectType.connection_type, null: false,
+ description: 'Allow list of projects that can be accessed by CI Job tokens created by this project.',
+ method: :all_projects
+ end
+ end
+ # rubocop: enable Graphql/AuthorizeTypes
+end