How to retain user permissions while using proxy(Viewer permsision not working as expected)


I created user in Grafana with “Viewer Role” and I am passing this user through X-WEB-AUTHUSER header using nginx proxy implementation.
After login with this particular user through reverse proxy, I still see this USER can edit graph panel though he has viewer permission which is not expected.
But If I login for same user by disabling proxy(Using login page on browser), I could see he cannot edit panel. Seems very strange.
Anyone have similar issues and resolution to it, Please suggest?.


location /grafana/ {
proxy_pass http://10.XX.XXX.XX:3000/;
proxy_set_header X-WEBAUTH-USER dev_user;