API and UI changes for group and application setting
What does this MR do and why?
API and UI changes for group and application settings for supporting an optional expiration date for Service account users access tokens- #421420 (closed)
Changes for UI implementation for Application and Group level settings. If this setting is off Service account tokens can have nil expiry date.
Changelog: added EE: true
Screenshots or screen recordings
Group Setting checkbox
Application Setting checkbox
How to set up and validate locally
- Run your application in saas mode and visit
Group > Settings > General > Permissions and group features
. - As a group owner you should be able to see the checkbox for changing
Service access token expiration
- Again run your aplication in self-managed mode this time and visit
Admin > Settings > General > Account and limit
. - As an admin you should be able to see the see the checkbox for changing
Service access token expiration
- Try updating the checkbox value and save data, it should reflect the change
API Changes
- Create a personal access token as application admin and store it in env variable USER_PAT. Use following api call to test application setting update
curl --request PUT --header "PRIVATE-TOKEN: $USER_PAT" "https://gdk.test:3443/api/v4/application/settings?service_access_tokens_expiration_enforced=true"
-
Create a new PAT as group owner or as an application admin again and update env variable if needed. Use following API call to test the changes
curl --request PUT --header "PRIVATE-TOKEN: $USER_PAT" "https://gdk.test:3443/api/v4/groups/35?service_access_tokens_expiration_enforced=Experimental"
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Smriti Garg