How to modify datasource based on User, Team or Org

I have a single PostgreSQL datasource that serves reports to multiple customers. I want to be able to restrict each customer from seeing the other customers data by either swapping the datasource or using a WHERE clause, (variables and templates.)

Whilst I can set the permission of each user to a datasource, that does not help me template a common set of reports that can be used by multiple users, teams or organisation where a variable can determine the datasource or WHERE clause.