Grant access tags when user's organization matches group or user is admin

I would like to solve the following problem:

I got some measurements as described here: Grant access to dashboard with only one specific variable

This is the query to get the groups-variable, which basically returns all urls a measurement has been done for:

SHOW TAG VALUES WITH KEY = "group" WHERE "category" =~ /$category/

In real life this would be like this:

SHOW TAG VALUES WITH KEY = "group" WHERE "category" = 'default'

group example_org

name: values
key   value
---   -----
group example_org

name: videoRecordingStart
key   value

Now I learned that Grafana does not provide a detailed ACL, but I can use global variables like the user’s organization name.

So my idea was: If I only want to show URLs of the user’s organization, I could extend my query and add a second WHERE-statement.

But on the other hand an administrator should be able to see all groups.

So my question is: Is it possible to define something like a conditional switch that:

  1. shows all group items where group matches the organization AND
  2. allows an user that is an administrator to see all groups

This topic was automatically closed after 365 days. New replies are no longer allowed.