Frontend: Render expiration for secrets permission
Why are we doing this work
This is a follow up from Show secrets permissions in the settings (!196970 - merged).
We are not saving the expiration on the backend, so we are not rendering the Expiration column for the permissions table for Secrets Manager.
Once [Backend] Add Expiration Management to Secret P... (#560829 - closed) is resolved, we can update the frontend to save expiration data for permissions and render them in the permissions table.
Implementation plan
We already have the UI for expiration, so this is just a matter of making sure we're saving/fetching this field.
Particularly, we should:
-
Make sure we're passing the expired_atfield in the mutation (create_secrets_permission.mutation.graphql). This applies to creating permissions for users, groups, and roles, which all use the same mutation. -
Include the expired_atfield when fetching the permissions list (secrets_permission.query.graphql) and render them at the table. Note that there's some logic introduced in !203652 (merged) where we modify the width of the table based on whether the current user has permission to delete or not (we hide the Actions column if they don't).
Verification steps
Setup
- Upload an Premium or Ultimate license.
- Set up openbao on your gdk.
- Enable the secrets manager on gdk.
Verification
- Go to your project settings (Settings > General) and expand Visibility, project features, permissions to view the permissions table.
- Create permissions by clicking on the upper right Add button.
- Verify that the expiration data is saved and the table renders them.
Edited by 🤖 GitLab Bot 🤖
