Loading
Filter unknown scopes in the secrets permissions table
What does this MR do and why?
Follow-up to !260976 (merged). It applies the two non-blocking frontend review suggestions from that MR.
formatActionsin the permissions table now filters out actions that have no entry inSCOPE_LABELSbefore it sorts and joins them. Before, an unknown action sorted first and rendered as an empty string, so the Scope cell started with a stray comma. This happens when an old frontend reads a newer action from the API, and it also covers the removal ofWRITEin 20.0.- The table spec no longer mounts the component a second time to check the
Updatelabel. The sharedUSER_PERMISSION_NODEmock now hasUPDATEout of order and an unknownDESTROYaction, and the existing assertion checks the full ordered stringRead metadata, Read value, Create, Update, Delete. This covers both the sort order and the filter.
Review threads this addresses:
References
- Parent MR: !260976 (merged)
- Work item: #630995 (closed)
- Tracking work item: #632994
Screenshots or screen recordings
No visible change for current data. The only rendering change is that an action the frontend does not know is omitted from the Scope cell instead of rendering as a leading comma.
How to set up and validate locally
Run the table spec:
yarn jest ee/spec/frontend/pages/projects/shared/permissions/secrets_manager/components/secrets_manager_permissions_table_spec.jsRemove the .filter line in formatActions and run it again. The renders user info test fails with a leading comma.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.