grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.46k stars 279 forks source link

Missing user details when editing a rotation #1820

Closed matiasb closed 7 months ago

matiasb commented 1 year ago

When updating as Editor a schedule in an organization with multiple users ( > 100), final schedule is displaying all users information (per #999), but we are still missing user details for users not available in that first page when editing the rotation:

rotation

Maybe we should get information for users in a schedule (which are usually not all users from an organization) from a specific schedule endpoint instead of the general user listing?

matiasb commented 7 months ago

This is still happening (https://github.com/grafana/support-escalations/issues/9265)

maskin25 commented 7 months ago

@matiasb the issue is that editors get 403 when try to fetch admins user data, is it by design?

In my local experiment IRM user is an Admin (pk: U96MQ72EFCFDI), and second@local is an Editor, if Iog in as second@local then I get 403 on /api/internal/v1/users/U96MQ72EFCFDI request

https://github.com/grafana/oncall/assets/3278022/6797d24e-f84c-41ee-9d7e-c0b8f269cac2

matiasb commented 7 months ago

Right, that's a possible issue. At some point we introduced a new schedule endpoint to get user information from there instead of requesting explicit user details. In any case, let me check for a work-around on the permission side which can be a simpler short-term solution (and eventually we can work on the frontend side to not require hitting the user details API?)

maskin25 commented 7 months ago

let's first check why editors can't load admin's profiles, then start switching to the new schedule endpoint

iskhakov commented 7 months ago

[@maskin] all done, we need to check if it works [Matias] plan to release it today