Loading
Allow Update secrets permission without Create
What does this MR do and why?
Lets Owners grant the Update secrets permission without also granting Create, and shows Delete last in the permissions modal.
Stacked on !260976 (merged), which adds the UPDATE action to the backend. This MR is frontend, docs, and specs only. It replaces !269737 (closed), which carried a duplicate of the backend change.
Details
- The Update checkbox is enabled whenever Read metadata is checked. The watcher that cleared Update when Create was unchecked is removed.
- The Delete checkbox moves below Create and Update.
- Docs: Secrets Manager user doc, permissions tables in
doc/user/permissions.md, and theservices.mdandopenbao_client.mddeveloper docs. - Specs: modal Jest spec, and project and group
UpdateServicespecs (an update-only grant can update an existing secret). The check that an update-only grant cannot create a secret is covered by the request specs in !260976 (merged). - The permissions table label and the backend specs for
UPDATEcome from !260976 (merged).
References
- Replaces !269737 (closed)
- Stacked on !260976 (merged)
- Related epic gitlab-org#24564
- Closes #633683 (closed)
How to set up and validate locally
- Enable Secrets Manager for a group - additionally you can also provision in a project to test there as well.
- Go to:
- For group secrets: Settings > Secure > GitLab Secrets Manager and select Add under User permissions.
- For project secrets: Settings > General > Visibility, project features, permissions > GitLab Secrets Manager and select Add under User permissions.
- Select a Reporter user and check Read metadata. Update is enabled without Create, and Delete is the last scope.
- Check only Update and save. The table shows "Read metadata, Update".
- Check Create and Update together and save. The table shows "Create, Update"
- As the update-only user, update an existing secret (this succeeds), then try to create a new secret (this is denied).
Screenshots and videos
| Before | After |
|---|---|
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist.
Edited by Sayo Bittencourt