diff options
Diffstat (limited to 'app/graphql/mutations/ci/job_token_scope/add_project.rb')
-rw-r--r-- | app/graphql/mutations/ci/job_token_scope/add_project.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/graphql/mutations/ci/job_token_scope/add_project.rb b/app/graphql/mutations/ci/job_token_scope/add_project.rb index 6071d6750c2..0358bb11c58 100644 --- a/app/graphql/mutations/ci/job_token_scope/add_project.rb +++ b/app/graphql/mutations/ci/job_token_scope/add_project.rb @@ -35,14 +35,13 @@ module Mutations def resolve(project_path:, target_project_path:, direction: nil) project = authorized_find!(project_path) target_project = Project.find_by_full_path(target_project_path) - frozen_outbound = project.frozen_outbound_job_token_scopes? - if direction == :outbound && frozen_outbound + if direction == :outbound raise Gitlab::Graphql::Errors::ArgumentError, 'direction: OUTBOUND scope entries can only be removed. ' \ 'Only INBOUND scope can be expanded.' end - direction ||= frozen_outbound ? :inbound : :outbound + direction ||= :inbound result = ::Ci::JobTokenScope::AddProjectService .new(project, current_user) |