debian-mirror-gitlab/app/graphql/resolvers/ci/job_token_scope_resolver.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
479 B
Ruby
Raw Normal View History

2021-09-30 23:02:18 +05:30
# frozen_string_literal: true
module Resolvers
module Ci
class JobTokenScopeResolver < BaseResolver
include Gitlab::Graphql::Authorize::AuthorizeResource
authorize :admin_project
2022-10-11 01:57:18 +05:30
description 'Container for resources that can be accessed by a CI job token from the current project.'
2021-09-30 23:02:18 +05:30
type ::Types::Ci::JobTokenScopeType, null: true
def resolve
authorize!(object)
::Ci::JobToken::Scope.new(object)
end
end
end
end