Menu

Fine grained access control

2024-10-13
2024-10-15
  • Lucio Crusca

    Lucio Crusca - 2024-10-13

    Depending on the user logged in, I need to filter out some entities from the list views and search results, so that some users only see some of the entities.

    In a previous post Javier showed me how to filter out entities of a collection, and that's ok, but what I really need is apply such filter to the list of entities that come up when clicking on a module too (e.g. filtering entities of the same model the user is looking at).

    How can I filter, programmatically, which entities should be shown?

     
  • Javier Paniza

    Javier Paniza - 2024-10-15

    Hi Lucio:

    You can achieve that combining a IFilter with a baseCondition in the @Tab:
    https://openxava.org/OpenXavaDoc/docs/tab_en.html

    I attached you a fragment of my book with an example of filtering data by user. Although the code is using OpenXava 4.x, all the code is perfectly valid with current v7.


    Help others in this forum as I help you.

     

Log in to post a comment.

MongoDB Logo MongoDB