Help creating my app

Need a platform for 3 types of users, every type should have different features.

Hello, you can create a True/False property for every type of users in the Users collection.

Thank you!

Alternatively, you can add a collection called “User Roles” which has a one-to-many relationship with users (Users can have one User Role, User Roles can have many Users).

Then, you can conditionally display things based on the user role.

The true/false method works well as @Ali-Bazzi mentioned, if you only have 2 user roles, but if you want to ever expand that, it’s better to use a collection.

So if you have, say 5 user roles, you don’t necessarily want to have 5 true/false parameters when you can just have the one relationship that ties them together.

I like to do it this way also because I add a number parameter to the collection and I call it “Access Level” which can allow users to see different things based on their level.

For example, if I have a “Customer, Employee, Manager, Super Admin” with access levels “1, 2, 3, and 4”, I can show employees+managers+super admins things by using “Where user role access level is greater than 1”. Or I can show just super admins things by user “Where user role access level is equal to 4” etc.

Great, relationships will also work for sure.

Thank you!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.