Role Structure
Available Roles
| Role | Description | Level |
|---|---|---|
| Owner | Full system access | 1 |
| Manager | Site management and user control | 2 |
| Developer | API and technical access | 2 |
| Support | Customer support capabilities | 2 |
| Marketing | Marketing and analytics access | 2 |
| Customer | Basic user permissions | 3 |
Permission Groups
Dashboard Permissions
User Management
Site Management
Role Management
Role Permissions Matrix
| Permission | Owner | Manager | Developer | Support | Marketing | Customer |
|---|---|---|---|---|---|---|
| dashboard:stats | ✓ | ✓ | ✓ | ✓ | ✓ | - |
| users:* | ✓ | ✓ | - | ✓ | - | - |
| sites:* | ✓ | - | - | - | - | - |
| roles:* | ✓ | - | - | - | - | - |
Implementation
Checking Permissions
Role Assignment
API Responses
Roles and permissions are included in user responses:Permission Checking
The API performs permission checks at multiple levels:- Route Level
- Controller Level
- Policy Level
Role Hierarchy
Roles follow a hierarchical structure where higher-level roles inherit permissions from lower levels:Best Practices
- Always Use Policies
- Group Related Permissions
- Cache Permissions
Common Issues
- Permission Inheritance
- Ensure proper role hierarchy
- Check inherited permissions
- Handle permission conflicts
- Role Assignment
- Validate role changes
- Check site-specific roles
- Manage role transitions
- Performance
- Cache permission checks
- Optimize role queries
- Use eager loading

