Restricting Access without the need for different User Roles

2
I have Lists and each List is used by a different Team. The Teams consists of users. These Lists should be restricted to their respected teams. Can I give a user a sort of subrole? 
asked
3 answers
3

With this domain, a User can only have access to a Team that he has a Membership to. Moreover, the same goes for a List; only Lists belonging to a Team that the User has a Membership to will be accessible. Same goes for the ListItem.

Hope this helps; if it does, please mark as correct ;-)

Best regards,

Wouter

answered
1

Are the lists lists of objects of the same Entity type? Of which each team only should see their objects? In that case you can make an association between the team and the objects. After that you can filter the data using Xpath so it will only show a list of objects associated with that team. Let me know if this is the case and you need more details or examples.

answered
0

One way to go about this would be to

  • Create a data view on a page, then put all your lists inside the data view, and wrap each list with a container.
  • Create a microflow that will be used as a data source for your data view, and make it return a non-peristable object called ListVisibility.
  • Inside the microflow do your calculations to check whether the current user belongs to a Team.
  • Based on your calculations, set an attribute inside your ListVisibility entity to True. If you have 5 potential lists to show, you would have 5 attributes in your entity i.e. canSeeList1, canSeeList2 and so on.
  • Now your data view returns an object with 5 boolean values
  • On your page, modify each container to have conditional visibility based on boolean values i.e. $currentObject/canSeeList1 = true

 

This should do the trick. You can also browse the app store for conditional visibility widgets which work in a similar way. I know of ShowByCondition, but not sure if it’s still being updated.

answered