Add UI for CI_JOB_TOKEN permission settings
What does this MR do and why?
Implements #465375 (closed). Depends on !154111 (merged).
This adds the UI and documentation for allowing jobs write access to the project when they use the CI_JOB_TOKEN. Since the feature uses the allow_push_repository_for_job_token feature flag, the UI setting is also hidden behind the same feature flag.
Documentation leads to https://docs.gitlab.com/ee/ci/jobs/ci_job_token.html#push-to-a-project-repository-using-a-job-token.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
| FF disabled | FF enabled |
|---|---|
![]() |
Screen_Recording_2024-06-28_at_16.11.23 |
How to set up and validate locally
- Enable the feature flag
rails c Feature.enable(:allow_push_repository_for_job_token, <project>) - Go to
/-/settings/ci_cdand expand the Token Access section. - Allow push to the repository should be disabled by default.
- Check the checkbox and save the changes. A toast message should pop up when the update is successful.
- Changes persist when you refresh the page.
Edited by Mireya Andres
