Add PATCH endpoint for group and instance level service account to edit email for the account.
Allow custom email address for Group service ac... (!181456 - merged) added the ability to add custom email addresses for service accounts. In order to extend editing of emails set for service accounts UI (i.e Being able to change email in Service Account U... (#537976 - closed)), we need to add PATCH endpoints for group level service accounts and instance service accounts.
Instance service accounts can utilize the base path used for /users API, as the service accounts behave similar to user accounts on SM
Some additional context:
The following MRs added the ability to create service accounts with a user defined email address at the top-level group. Defining a
Previously added update service for top-level group
The following MR added the update service (and edit endpoint) for top-level service accounts, but skipped over e-mail. E-mail was intentionally skipped on a first iteration as discussed in #514528 (comment 2366513849)
What works
- created a NEW service account either from the instance admin settings or top-level group settings and providing a user defined e-mail address
Whats missing
- Attempting to edit an email address on a service account from the instance admin settings OR the top-level group settings returns a 200 OK status code and response, but the changed email address doesn't commit and update. No errors returned.
Endpoint hit for instance admin service account editing
Request URL
https://gdk.test:3000/api/v4/users/125
Request Method
PUT
Status Code
200 OK
Endpoint hit for top-level group service account editing
Request URL
https://gdk.test:3000/api/v4/groups/24/service_accounts/123
Request Method
PATCH
Status Code
200 OK