Hello,
I expose my case:
1 - Login with admin user via Basic Auth
2 - Switch to a Viewer user using:
http://docs.grafana.org/http_api/user/#switch-user-context-for-a-specified-user
curl -H “Authorization: Basic ZGVtbzpkZW1v” -X POST “http://monitor.demo.com/api/users/30/using/37”
Response: {“message”:“Active organization changed”}
3 - Star/Unstar dashboard
http://docs.grafana.org/http_api/user/#star-a-dashboard
curl -H “Authorization: Basic ZGVtbzpkZW1v” -X POST “http://monitor.okitup.net:3000/api/user/stars/dashboard/51”
{“message”:“Dashboard starred!”}
The problem:
I thought that switching user by user_id = 30 (viewer) it will star/unstar dashboards for that user.
But this is working for the admin user.
Admin and Viewer users belong to the same organization.
I use it to star a dashboard and then change the preferences to set a HomeDashboard.
I want to do it without login as the viewer user.
Thanks!