I have a report which has list of users from postgresql database . It includes server admins,site admins ,publishers, interactors, viewers . for example if a user wants to see who all have are site admins he can select site admin filter with values as "y" same for rest of the users . Now my requirement is to allow only site admins to see their users information. lets say a users "X" is a site admin of site "A" and so when X login to tableau server and access this report he should be able to see his site users only his site admins,publishers, interactors, veiwers info not for others sites users . I am attaching the report snap shot as well .
This is the query:
select sites.name, system_users.name from system_users
inner join users on (users.system_user_id = system_users.id)
inner join sites on (users.site_id = sites.id)
where users.admin_level > 0
This returns which user should see which site.