Skip to content

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

Screenshot 2023-11-08 at 6.52.53 PM.png

Application Setting checkbox

Screenshot 2023-11-08 at 6.52.08 PM.png

How to set up and validate locally

  1. Run your application in saas mode and visit Group > Settings > General > Permissions and group features .
  2. As a group owner you should be able to see the checkbox for changing Service access token expiration
  3. Again run your aplication in self-managed mode this time and visit Admin > Settings > General > Account and limit .
  4. As an admin you should be able to see the see the checkbox for changing Service access token expiration
  5. Try updating the checkbox value and save data, it should reflect the change

API Changes

  1. 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"
  1. 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.

Edited by Smriti Garg

Merge request reports