4 Replies Latest reply on Dec 9, 2017 9:57 AM by Yuriy Fal Branched from an earlier discussion.

    Row level security using USERNAME() and limiting the quick-filters?

    Bodhisattva Dasgupta

      I have implemented Entitlements in my project using USERNAME() and data-blending with Entitlements table which is outside the data-source. Can you help me understand how to limit Quick-filters on the dashboard to show only those values of a dimension that the logged in user is Entitled to ?

       

      Giving an example

       

      I have a data table PRODUCT_DATA

      MockTable1.jpg

       

      and i have an entitlements table PRODUCT_ENTL

      MockTable2.jpg

       

      Now I create 2 datasources

      1. Datasource DS_DATA : select * from PRODUCT_DATA - this is EXTRACT
      2. Datasource DS_ENTL : select * from PRODUCT_ENTL - this is LIVE

       

      I also apply a Data Source Filter on ENTL to set [User Name] = USERNAME()

       

      Now I start by

      1. building a crosstab using DS_DATA
      2. blend with DS_ENTL using the [Product Name] field
      3. Pull [Has Access] from DS_ENTL (which is now Secondary Data source) to Filter shelf and "Exclude" Null

       

      This gives me a perfect crosstab for whoever logs in.

       

      Good till here !

       

      The issue I get is when I want to provide a quickfilter for [Product Name].

       

      When I do that, i get all the [Product Name]-s in the filter, irrespective of the entitlements of the user who has logged in.

       

      I even tried using the [Product Name] field from the Secondary data source - but that does not work either - over there, I get the names of the entitled product names and also a "Null"

       

      What i would like to do is - show only those [Product Name]-s that the USERNAME() user is entitled to.

       

      Is there somehow I can get the 'Product Name] filter to show only "Relevant" or "In Context" values ?