I have a web portal where I store information about have multiple physical sites. I have many users who are restricted to operate one or multiple sites. I want to create a dashboard that would restrict user access only to their sites.
I had an idea if it would be possible to pass programmatically userid from my portal where I embed the dashboard into Metabase custom SQL query. This query would look up sites available to user and would limit the data only to what access the user has. Is there a way to pass a filter param from my portal into custom SQL of the metabase?
Can I use param in the Sharing ->Application code to resolve this?
var payload = {
resource: { dashboard: 1 },
params: {}
};
Thanks for this.
One more related question, is there a way to limit the list of values in the Field Filter? I.e. I have the list of many sites, but I want user see in the filter dropdown box only sites the user has access to?
Hi @flamber. If I want to develop the solution on my own, do I code the select filters separately and then pass the values into Metabase? In this case every time the value changes, I would pass it as param into Metabase and force a refresh. In the free version, I can’t restrict the values in my list?