Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Entity filtering #4516


User avatar
0
Ricavir created

Hi,

In my current project, my customer asked me to restrict access to an entity (let's call this entity "People") according to the user currently logged. The goal is to hide some people entities according to the user. A people entity can be visible for more than one user. Therefore, the relationship between people and user is a many-to-many.

I plan to :

  • Add a collection of people to User entity OR
  • Add a collection of people to OU entity

Then, I just need to adapt my app service query to retrieve a list of people that is visible for the current user.

Do you have any advice to do this in a better way ?

I had a look to dynamic filters but don't know if this could help as the relationship between people and user is a many-to-many.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir If you need this requirement for a single entity, then your approach is fine I think.

  • User Avatar
    0
    Ricavir created

    No in fact, it could be more than one entity

  • User Avatar
    0
    ismcagdas created
    Support Team

    @Ricavir then maybe you can think of a more common connection entity which contains EntityName (string), EntityId (string) and UserId (long). You can work on it to make it better of course, this is just the initial idea :).