Custom user type
Sometimes you might have users with different roles. Your app has to provide different views and functionality based on the current user.
For example: In a project team there are team members and managers:
- Everyone can create an issue, but only a manager can assign an issue to someone else.
- Team members can only read issues assigned to them, while managers can view all issues.
- An issue has a few protected fields which can only be modified by a manager.
- Everyone can write comments, but a manager can also write manager reviews.
![](/assets/guide/user-custom-member-2.png)
Normal user
![](/assets/guide/user-custom-manager.png)
Manager
How to build
- Add a new user model
- Add additional relationships to other data models
- Define which users have access to which pages
- Define how users can modify data on each page
![](/assets/guide/user-custom-new.png)
Add a new user model
![](/assets/guide/user-custom-relationship.png)
Add relationships
![](/assets/guide/user-custom-drawer.png)
Define which users have access to which pages
![](/assets/guide/user-custom-view-access.png)
Define how users can modify data on each page