Hello amazing GoodData people! I'm trying to crea...
# gooddata-platform
t
Hello amazing GoodData people! I'm trying to create some Data Permissions, using the User Filters Bricks. The Permissions were created, and seem to point to the correct uris, the attribute_uri, and the element_uri, however the Permission does not filter any results from the datasets it should act upon. Upon closer investigation through the grey pages, there is an error in the element_uri, which doesn't affect the creation of DataPermissions using the uri, but neither do they work. I've read over the Documentation, but cannot see where I could have gone wrong, if anyone has any ideias?
i
Hi Tomas, From the quick check, the error indicates that you should work with attribute label, instead of the attribute object itself. Could you give it a try, please?
attributeDisplayFrom=label
I know, it is bit cryptic, sorry for that.
t
Hey @Ivana Gasparekova! Thanks for the reply! I am referencing the attributeDisplayForm in the filter_config of the Bricks like so, is this what you mean?
Adding some context, we have a data_permissions Dataset that has FK in all other datasets, and we wish to create the DataPermission on that attribute
i
Could you kindly double-check that object ID “3824”? Does it match the preferred label, please?
t
image.png
image.png
If I access the uri in the "elements", it shows the error I sent initially
I have tried creating these permissions manully with the API, and using the
obj/3825
uri, which seemed at first to be the correct one, but it returns an error saying that attributeDisplayForm is not accepted, and this is not the uri set inside the elements object, which is how the Documentation says it should be
i
Could you share the most recent errorId with me, please? Does your
filters_config
matches the input source?
t
Hey @Ivana Gasparekova I hve been out of the office, but would like to take this issue up again. The error does not show up as a response to any action, if I try to access the uri: /gdc/md/qtdib0h9zb9wlokqvmf2jqdi0a5ne65b/obj/3824/elements?id=12. Let me know if you need the full URI with the domain, and I'll send it privately
Oh wait, I think I understood incorrectly, it does generate a new ID whenever I access the page, this is the most recent one:
"requestId" : "34IdGz0UAR0iUJ7m:6brnmubtf4ncoadl"
Regarding the other question about the filters_config. Yes it does match the columns selected in the input_source
i
Hey @Tomas Gomes, No worries at all, I hope that you enjoyed your time off. Now I understand the situation, but it doesn’t seem like a URI issue to me. The error(s) is actually expected. You can list all attribute elements, as mentioned here and also in our apiary. But you cannot access each elementId.
I am afraid, the issue is caused by something else.
When you check our documentation it works like this. The output data permissions:
Copy code
<mailto:john@example.com|john@example.com>: WHERE city IN ('San Francisco', 'Prague', 'Amsterdam')
The column-based input data:
Input data with headers:
Copy code
{
  "filters_config": {
    "user_column": "login",
    "labels": [
      {
        "label": "label.cities.city_id.name",
        "column": "city"
      }
    ]
  }
}
If this doesn’t help, I am happy to create a follow-up ticket on your behalf and review the brick and the filters in a better detail.
t
I made the adjustment you suggeste and the error changed, do you mind if I send the screen privately, as it contains sensitive information
?
i
Sure thing, please feel free to send it via DM.
t
@Ivana Gasparekova thank you for all your help, the Data Permissions are working perfectly, just as expected. The following corrections had to be made for it to work: • The Dataset that needed to be filtered out during our tests was not properly referencing the Data Permissions dataset, so we added the ForeignKey to the Data Model • The attribute we were pointing to was correct in the first round, pointing to the displayFormID, however the source table did not have all the necessary values for this ID, it was supposed to reflect the segments present, and the source table only had 1 segment registered in it After making these changes the bricks runs smoothly and the data is filtered out according to the respective permissions. You were amazing, and thank you once again for the patience and great insight! 🚀
🙌 1
i
Thank you very much for all your efforts here and also for this nice summary, which might help other users with their User Filters Brick journey! 🙌
❤️ 1