summaryrefslogtreecommitdiff
path: root/lib/api/entities/project_job_token_scope.rb
blob: 0954db3a2fc84345fd8f6c037e1963e3e0479c00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

module API
  module Entities
    class ProjectJobTokenScope < Grape::Entity
      expose(:inbound_enabled, documentation: { type: 'boolean' }) do |project, _|
        project.ci_inbound_job_token_scope_enabled?
      end
      expose(:outbound_enabled, documentation: { type: 'boolean' }) do |project, _|
        project.ci_outbound_job_token_scope_enabled?
      end
    end
  end
end