Forum Discussion
RLS doesn't work with identities from embed token (don't filter the report data)
- 8 years ago
Solved!
The issue was tha bad key in post json: "identitites" instead of "identities".
That bug was difficult to be discovered as the request gave back the correct response with the report token. But in the request body was taken only accessLevel and identities part has been ignored.
I'm using it at my app so it's look like that on the raport side
Then in the code I'm using
accessLevel: "view", identities: new List<EffectiveIdentity> { new EffectiveIdentity(username: "[email protected], roles: new List<string> { DynamicUser }, datasets: new List<string> { somedatasetid }) }
But I'm using .net app so it should be sth like this if we use hardcoded values
"accessLevel": "View", "identities": [ { "username": "[email protected]", "roles": [ "DynamicUser" ], "datasets": [ "somedatasetid" ] } ]
thx, I do it exactly as you wrote (using Spring REST API)
- TriPax8 years agoFrequent Visitor
it is working ok now?
- jarek_blaszczyk8 years agoRegular Visitor
no
- TriPax8 years agoFrequent Visitor
try to see this report as this sended user - open place when you have Roles button and on the right side we can also try to see report as an different user - if you add this username there report should be filtered
if it's not then format for username is different
if it's ok then we need to go deeper and see what you try to shoot to the server - you can for example download Embed-API-Sample-master application and modify it to use with your filters - then token what is generated can be used with js what show report at the webpage