Change Chart Views according to User Roles

I’m having trouble creating user permissions for charts in my dashboard. I’ve created an authenticated dashboard with Atlas App Services as my Authentication provider. In creating an authentication provider, I’ve made sure that fetch data from app services is toggled on. My rules for my data source is as below:

Despite this, when I login as a user with specific permissions, I get the same output as a user with the no permissions. I’m not sure what I’m doing wrong here. Hope someone can help!

Alternatively, I’ve tried to also use an Injected function with this code:

    return { owner_id: };
  return {};

But this still displays the chart header - just without the data included which is not what I want.

Thank you in advance for your help!

Hi @Sidhika_Tripathee -

I’m not an expert in how App Services rules should be configured, but if the rules are correct (i.e. they filter data as expected when using the App Services SDK) then they should work for embedded charts too.

The injected filter approach should also work. If you are seeing just the chart header and nothing else, that would imply that the function is falling through to the return {} code. Have you tried inspecting your JWT token in to ensure it includes the expected value under the path?