gavinvaske / the_recipe_book

0 stars 0 forks source link

Refactor how Roles are used for Authentication/Authorization #349

Closed gavinvaske closed 2 months ago

gavinvaske commented 2 months ago

Description

Previously, the User db table had an attribute called userType.

This was used to determine the roles a user had and their access rights.

However, this param was singlular and not exactly as descriptive as I'd like, so I removed those references and now use the following:

User.authRoles = type Array

Now we can assign a user multiple different "roles" which we can then user in the API and react ui to grant granular permissions