Add ability to set a user type and assign institutions
When creating or editing a User, add the ability to set the user as either an:
- admin (ability to manage everything about everything)
- institutional (ability to manage everything about 1..n Institutions)
- helpdesk (ability to view Institution information and manage Contact information)
add helper methods to the user class to check for roles, e.g. admin?
institutional?
helpdesk?
add a required string field to User that stores this value
add a optional m2m relation between User
and Institution
, and corresponding User form elements
add a <select>
to the User form to set this value
in the migration, set existing users to admin
. also be sure to update user created in seeds file.
Edited by Mike Kanning