diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-07 21:09:58 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-07 21:09:58 +0000 |
commit | 919e3e3cd83e76dba137ef9bcc4746214c2085ff (patch) | |
tree | 4e9799b9c6193583896ea1f05137815ff9782796 /app/graphql/mutations/ci/job_token_scope/remove_project.rb | |
parent | 6cae2159b8ce1e84fad48f3dbd5368995cbd87b1 (diff) | |
download | gitlab-ce-919e3e3cd83e76dba137ef9bcc4746214c2085ff.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/mutations/ci/job_token_scope/remove_project.rb')
-rw-r--r-- | app/graphql/mutations/ci/job_token_scope/remove_project.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/graphql/mutations/ci/job_token_scope/remove_project.rb b/app/graphql/mutations/ci/job_token_scope/remove_project.rb index f503b4f2f7a..e5f40bbf87e 100644 --- a/app/graphql/mutations/ci/job_token_scope/remove_project.rb +++ b/app/graphql/mutations/ci/job_token_scope/remove_project.rb @@ -18,18 +18,23 @@ module Mutations required: true, description: 'Project to be removed from the CI job token scope.' + argument :direction, + ::Types::Ci::JobTokenScope::DirectionEnum, + required: false, + description: 'Direction of access, which defaults to outbound.' + field :ci_job_token_scope, Types::Ci::JobTokenScopeType, null: true, description: "CI job token's scope of access." - def resolve(project_path:, target_project_path:) + def resolve(project_path:, target_project_path:, direction: :outbound) project = authorized_find!(project_path) target_project = Project.find_by_full_path(target_project_path) result = ::Ci::JobTokenScope::RemoveProjectService .new(project, current_user) - .execute(target_project) + .execute(target_project, direction: direction) if result.success? { |