blob: 7fd288491efb12742e5c180d3f561ac39ae72c20 (
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
|
# frozen_string_literal: true
module API
class ProjectJobTokenScope < ::API::Base
before { authenticate! }
feature_category :secrets_management
urgency :low
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
desc 'Fetch CI_JOB_TOKEN access settings.' do
failure [
{ code: 401, message: 'Unauthorized' },
{ code: 403, message: 'Forbidden' },
{ code: 404, message: 'Not found' }
]
success code: 200, model: Entities::ProjectJobTokenScope
tags %w[projects_job_token_scope]
end
get ':id/job_token_scope' do
authorize_admin_project
present user_project, with: Entities::ProjectJobTokenScope
end
end
end
end
|