Draft: Add SSO ID to Audit Event APIs
What does this MR do and why?
We have been requested by users to add email and sso ID to the audit event details (#386322 (closed) )
This commit adds the email to the group, project, and user APIs via
modifying the model's formatted_details
method
This method is used in the Grape presenter here
How to set up and validate locally
- make sure you have an EE enabled local gitlab instance
- create a group and user with SSO (???how to do this)
- create a personal access token on an admin account to use with the API calls
- save token in terminal variable
TOKEN=glpat-blahblahblah
- I used the following bash 1-liners to fetch the affected APIs
curl --header "PRIVATE-TOKEN: $TOKEN" -X GET -H "Content-Type: application/json" -H "Accept: application/json, text/plain, */*" "localhost:3000/api/v4/groups/70/audit_events?per_page=100&page=1" | json_pp
curl --header "PRIVATE-TOKEN: $TOKEN" -X GET -H "Content-Type: application/json" -H "Accept: application/json, text/plain, */*" "localhost:3000/api/v4/projects/19/audit_events?per_page=100&page=1" | json_pp
curl --header "PRIVATE-TOKEN: $TOKEN" -X GET -H "Content-Type: application/json" -H "Accept: application/json, text/plain, */*" "localhost:3000/api/v4/audit_events?per_page=100&page=1" | json_pp
- you should see author email in the responses
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.