Token Access options should not be hidden when CI is disabled on a project

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

The Limit access to this project configuration item (part of Token Access) is not reachable when CI/CD is disabled for the project. This option controls access to the project as a submodule, it is orthogonal to whether or not CI/CD is enabled.

Steps to reproduce

  • Create two repositories: repo1 (internal) and repo2 (private).
  • Add repo2 as a submodule of repo1.
  • Disable CI/CD in repo2.
  • Configure CI/CD in repo1.

Naturally the CI jobs in repo1 will complain with remote: The project you were looking for could not be found or you don't have permission to view it.. The Access Token configuration section is nowhere to be found in repo1.

What is the current bug behavior?

The entire "CI/CD" section of the project configuration disappears when CI/CD is disabled for the project, even the Access Token's Limit access to this project option.

What is the expected correct behavior?

The Access Token's Limit access to this project option should still be configurable even with CI/CD is disabled for the project.

Output of checks

Edited by 🤖 GitLab Bot 🤖