Files
social-media/frontend/docs/claims-and-roles.md

17 lines
632 B
Markdown

# Claims and Roles Guidelines
To ensure consistency across the application, all claim and role values MUST be in lowercase.
## Roles
The following roles are currently used in the system:
- `administrator`
- `manager`
- `client`
- `provider`
- `developer`
## Implementation Notes
- **Processing**: The `authStore.js` automatically converts all roles extracted from JWT tokens to lowercase.
- **Comparisons**: All checks (e.g., `authStore.hasAnyRole(['role-name'])` or `meta: { roles: ['role-name'] }`) should use lowercase strings.
- **Routing**: Route guards in `router.js` expect lowercase role names in the `meta.roles` field.