View Only

 User authentication based on a Field or Parameter

Eduardo de Lima's profile image
Eduardo de Lima posted 01-25-2022 13:42
Hello, I have a Pentaho CDE all set up and many dashboards. All these dashboards get data from the same database, this database includes the data of many different companies. My question is : How can I authenticate  i.e: UserA to acces only data that contais the id_company = 1000 in the database tables?
Basically what I want to do is assign an id_company value to each user in pentaho cde, so the user can only see data related to his company.
Marvin Horst's profile image
Marvin Horst
  • You could add a user table to your database with a company_id assigned to each user.
  • Change all your queries to get the company_id from a join to the user table.
  • Assign the user to a custom parameter in the CDE dashboard and pass this parameter to your queries.

Custom Parameter -> Properties -> Javascript code
dashboard.context.user; ​