Open Closed

Saas Data Filtering questions #648


User avatar
0
christianharo created

.

ABP Framework version: v4.0.00 UI type: Angular Identity Server Seperated (Angular): yes

Hello,

Using Abp Commercial V4 and Angular as UI. What will be the best way to implement the following?

Suppose that Tenants are the schools , These schools have users as teachers, students and parents, I assume these will be Roles.

The Teachers will only be able to see their assigned students data, The Parents only their kids data and the Students only their own data.

First thing that comes in mind is Data Filters . I am wondering if this is correct way with ABP or what will be the recommended way. Also if there are any examples of this will be great.

Thanks.


3 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    Using global filters is great, but you pay attention to the following:

    1. Do not use CurrentUser's roles. It is parsed from the token and will not be kept up to date,
    2. You can store roles in the cache and always keep the cache up to date
    3. Follow the custom filter document: https://docs.abp.io/en/abp/latest/Data-Filtering#defining-custom-filters
  • User Avatar
    0
    christianharo created

    Thanks for the answer i assume will need to be a combination of data filters and roles as the security needs to be taken care of by the roles.

  • User Avatar
    0
    alper created
    Support Team Director

    closing it, you can reopen if you need further help

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11