GET /users/:id/notification_settings (for admins)
Problem to solve
Admin can query:
GET /users
GET /users/:id/emails
GET /groups/:id/notification_settings
GET /projects/:id/notification_settings
GET /notification_settings
but not:
GET /users/:id/notification_settings
Intended users
Admin
Further details
As an admin, I need to ensure that all users have set a working global notification email. We run our own instance of gitlab in azure, but our outgoing mail is restricted to internal email addresses, and the ldap hooked to gitlab has microsoft azure emails which won't work. I know I can modify the ldap email setting in gitlab.rb to use a different attribute, but at this time it doesn't look like we will populate another field for this purpose.
I figured I could at least use the GitLab API to query which users don't use an internal email address for global notifications. Alas, I can only fetch my own notification_settings, not other users, even as admin.
Proposal
GET /users/:id/notification_settings
Permissions and Security
Admin API
Documentation
Update the Notification settings API doc accordingly.
Testing
Test that only admin has access.
What does success look like, and how can we measure that?
curl --header 'PRIVATE-TOKEN: '"$TOKEN_OF_USER_15"'' https://gitlab.example.com/api/v4/notification_settings
must return the same as:
curl --header 'PRIVATE-TOKEN: '"$TOKEN_OF_ADMIN"'' https://gitlab.example.com/api/v4/users/15/notification_settings