diff options
Diffstat (limited to 'app/models/ci/job_token/scope.rb')
-rw-r--r-- | app/models/ci/job_token/scope.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/ci/job_token/scope.rb b/app/models/ci/job_token/scope.rb index f389c642fd8..17809ba20d3 100644 --- a/app/models/ci/job_token/scope.rb +++ b/app/models/ci/job_token/scope.rb @@ -54,6 +54,11 @@ module Ci # if the setting is disabled any project is considered to be in scope. return true unless current_project.ci_outbound_job_token_scope_enabled? + if !accessed_project.private? && + Feature.enabled?(:restrict_ci_job_token_for_public_and_internal_projects, accessed_project) + return true + end + outbound_allowlist.includes?(accessed_project) end |