Closed
Description
Also, browser console logs show.
Failed to load resource: the server responded with a status of 403 ()
/api/v2/insights/user-latency?template_ids=0d286645-29aa-4eaf-9b52-cc5d2740c90b&start_time=2023-07-19T00%3A00%3A00Z&end_time=2023-07-26T00%3A00%3A00Z:1 Failed to load resource: the server responded with a status of 403 ()
/api/v2/insights/templates?template_ids=0d286645-29aa-4eaf-9b52-cc5d2740c90b&start_time=2023-07-19T00%3A00%3A00Z&end_time=2023-07-26T00%3A00%3A00Z&interval=day:1 Failed to load resource: the server responded with a status of 403 ()
Visiting https://dev.coder.com/api/v2/insights/user-latency?template_ids=0d286645-29aa-4eaf-9b52-cc5d2740c90b&start_time=2023-07-19T00%3A00%3A00Z&end_time=2023-07-26T00%3A00%3A00Z
and
https://dev.coder.com/api/v2/deployment/stats
{"message":"Forbidden."}
A template admin should be able to see insights for the template he is the admin of. We can make a user template admin for a specific template while his general role is a member. In that case, also he should be able to see the insights for the said template.