Base solution for your next web application
Open Closed

Organisational Unit #8756


User avatar
0
Siyeza created

I added a user to a particular org unit. i then added a org unit lookup for a particular entity. I want users on org unit A to only see entities on org unit A.

What I did is not working...what do I do?


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi Please check out organization's documentation.

    Filter Entities For A User

    We may want to get all products that are in the OUs of a specific user. Example code:

    https://aspnetboilerplate.com/Pages/Documents/Zero/Organization-Units#filter-entities-for-a-user

  • User Avatar
    0
    Siyeza created

    Let me work on this, I will let u know

  • User Avatar
    0
    ismcagdas created
    Support Team

    @siyeza Thanks.

  • User Avatar
    0
    Siyeza created

    Turns out your suggestion there works really well and if you want to ignore (say entities that are not assigned to unit)...this below does the trick.

    .... entities not assing to any org unit will be shown to everyone.

    (yourOrgnanisationalUnitCodes.Contains(x....somecode) ||string.IsNullOrWhiteSpace(x...somecode))