Making a Vapor App with different profiles

Hello,

I’m doing a Steam application to manage school sports. Each user of this application has an assigned role and based on his profile he will see one section or another.

Whats the better option to do this? I’m thinking of several alternatives and I do not know which one is the best.

Fran

@0xtim Do you have any feedback about this? Thank you - much appreciated! :]

I think this question is better suited for our Discord (http://vapor.team) as it seem as more a discussion point :slight_smile:

However based on the complexity of the role system, there are several options, if it’s just like an admin/user you can just have a bool in your user table.

If it’s more complex user system, i would maybe do it with either a role name on the user, or with a Pivot table to link a user to a role (If a user can have multiple roles)
Looking up the role on the user to show the content should be fairly easy either way :slight_smile: