For templates,can we prevent a user to switch to a value

For dashboard templates,can we only allow a user to specify the values in url and don’t allow him to switch to different values?

for example,he can use following url to access a dashboard,but he can’t change var-DS to another value

http://rdsmon-test.huawei.com:8000/dashboard/db/cdb?var-DS=DS_P2_hwAdmin&var-architectureName=arch123&var-cdbName=clusterdb234&var-sid=cdbctF1

thanks

No, not really. Grafana does not provide security at this level. Even if we changed Grafana to prevent users switching to a value, they could easily get around this using a tool like curl, postman or a Chrome plugin. This sort of security should be implemented at the database level (like a relational database does with roles).

See this recent issue for a discussion on database security: https://github.com/grafana/grafana/issues/8731