Skip to content

Allow Auditors to see the pipeline editor full configuration tab

Kenneth Chu requested to merge kenneth-auditor-pipeline-editor-full-config into master

What does this MR do and why?

Allow Auditors to see the pipeline editor full configuration tab

Fixes: #357329

How to set up and validate locally

  1. Create a new project. Let's call the project ProjectA.
  2. Add a .gitlab-ci.yml to the project that includes a template. Eg.
    include:
      - template: Security/Secret-Detection.gitlab-ci.yml
  3. Create an Auditor user.
  4. Ensure the Auditor user is not a member of ProjectA.
  5. Login as the Auditor user, and navigate to ProjectA.
  6. In the sidebar, we should be able to now navigate to CI/CD -> Pipeline Editor.
  7. Go to the Full configuration tab. We should be able to see the full YAML configuration.
  8. Check in the Editor tab, check we are not able to make a commit in the pipeline editor.

Note: The Validate function under the Validate Tab does not work as expected, because it relies on the create_pipeline policy, which we don't want to give to the auditor user on all projects.

See different sections of the code that check for create_pipeline when trying to use that functionality:

If this MR is merged, we should create a new issue to track fixing this at a later time.


MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kenneth Chu

Merge request reports