Backend Usage
Checking User Roles
Assigning Roles
Frontend Usage
Using User Methods
Conditional Rendering
API Reference
User Methods:user.hasRole(role: string): boolean- Check if user has a specific roleuser.requireRole(role: string): void- Throw error if user doesn’t have role