Creating Multi-Sided Apps with User Roles

Hello everyone! We have some expanded and updated documentation on how to create multi-sided apps based on user roles. For instance client and business, teacher and student, or admin and member.

1 Like

I reviewed these details and now have a pretty good idea of how to set up permissions for my maintenance app with Admin, Managers, Area Managers and Resolution Experts. Some will view service requests, some will create and some will resolve and close.

I am having some trouble, however, in specifying the number of locations each user can see. I would like the viewing/access of service requests for specific locations to be independent of the permissions roles and to set them up by turning on or off (true/false) access to each location for a specific user. I can’t quite conceptualize how to make this happen with collections and relationships. I have a locations collection and a users collection. Since every user may have different locations they can see, do I need another collection?

If I understand correctly, I think you could create a relationship between users and locations (many-to-many), then assign locations to users so that they can see all the requests for that location.

What do you mean, assign users to locations? In the users collection by way of a property? Can a property hold more than one value? Or will I have a property for every location (there are currently 30).

Yes you can assign users to locations. What collections do you have setup currently?

I have users and locations along with other service request-related collections.

I want a user to see service requests from 1 or more locations…and the locations and number of locations for which service requests are seen vary with each user. I was thinking I needed to set up another collection to somehow define this.