Using RLS for dashboard only not analysis

Hi community,

I have embedded dashboard in my website and have enabled row level security to show user specific data. RLS is applied to both analysis and dashboard. Is there any way we can keep it enabled for dashboard only. So that if I need to make any changes in dashboard, I don’t have to disable dashboard link from my website.

Hello @Raghu, I am a little confused about your question. You shouldn’t need to disable the dashboard link when making changes in the analysis, unless there is something I am missing in your work flow. It will update the dashboard when you republish.

As for RLS, those rules are set at the dataset level, so if your dashboard and analysis are using the same datasets they will both be restricted by the same rules.

Hi @Raghu,

Is the reason why you want to disable RLS so that you can see data in the analysis when you’re making changes? Do you then disable the dashboard link on your site so that users don’t have access to unrestricted data while you’re making changes to the analysis?

If you want to see all data when you’re viewing an analysis or dashboard as an author, you should add yourself to the RLS rules.

1 Like

Hi @DylanM ,
Thanks for the reply. I don’t won’t to expose all data to the users. That is why I have to disable dashboard link from my website every time I need to disable RLS for any update.

Hi @David_Wong ,
Thanks for the reply. Yes, you guessed it right. I don’t want to expose my data while making changes.

I tried to add dataset in User-based rules where I entered only my user name in UserName column and left all the columns empty so that I can get access to complete dataset.

But then I got this error.

Even changing the datatype of “createdon” column to Date didn’t worked. Showed same error.

Hi @Raghu,

Are you including all the fields of your dataset in your RLS rules? You only need to include the fields that the rules are based on. RLS rules can only be based on text fields.

1 Like

Worked for me. I was including all fields initially. Thanks.

1 Like