Available User Roles
Hiro includes 6 built-in roles, each with specific permissions:Super Admin
Full system access
- Complete control over all modules
- User management
- System settings
- All location access
CEO
Executive dashboard access
- View all operations
- Executive analytics
- All modules except user management
- Read-only settings
Marketing
Customer & campaign management
- Customer database
- Marketing campaigns
- Segments and automations
- Basic operations access
Operaciones
Daily operations management
- Reservations
- Customer interactions
- Tickets and service
- No marketing or HR access
RRHH
Human resources management
- Employee management
- HR tools
- Limited customer access
- No operations access
PR Comunicación
Public relations & media
- Media center
- Press kit
- VIP management
- Limited operational access
Permission Matrix
Here’s what each role can access:| Module | Super Admin | CEO | Marketing | Operaciones | RRHH | PR Comunicación |
|---|---|---|---|---|---|---|
| Dashboard | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Tickets | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Operaciones (Reservations) | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Clientes (CRM) | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ |
| Marketing | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
| RRHH (HR) | ✅ | ✅ | ❌ | ❌ | ✅ | ❌ |
| Ejecutivos (Analytics) | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
| Grupo (Media Center) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| User Management | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ |
| Settings | ✅ | ✅ (read) | ❌ | ❌ | ❌ | ❌ |
frontend/lib/roles.ts:20-93 for the complete permission definitions.
Role-Based Code Implementation
Role Type Definition
frontend/lib/roles.ts:1-18
Checking Permissions
frontend/lib/roles.ts:95-99
Managing User Roles
Creating a New User
Access User Management
Only Super Admin can create users.Navigate to Settings > Team (or use the admin script).
Assign Role
Select the appropriate role based on the user’s responsibilities:
- Operations Team
- Marketing Team
- Executive Team
- Support Teams
Use Operaciones for:
- Restaurant managers
- Reservation coordinators
- Front-of-house staff
- Service supervisors
Changing User Roles
Authorization System
Server-Side Authorization
Hiro uses server-side checks to enforce permissions:frontend/lib/authz.ts:5-51
Authorization Flow
Role-Based UI Customization
Dashboard Customization
Different roles see different dashboard greetings and features:frontend/components/dashboard/CustomizableDashboard.tsx:162-424
Navigation Restrictions
Menu items are hidden based on role:Common Role Scenarios
Multi-location restaurant manager
Multi-location restaurant manager
Recommended Role:
operacionesCan access:- View reservations across all locations
- Manage daily operations
- Handle customer service tickets
- Access customer profiles
- Marketing campaigns
- Executive analytics
- HR functions
- System settings
Marketing coordinator
Marketing coordinator
Recommended Role:
marketingCan access:- Customer database and segments
- Create and manage campaigns
- Set up automated workflows
- View basic operational data
- HR functions
- Executive-level analytics
- Detailed operations (reservations)
General manager
General manager
Recommended Role:
ceoCan access:- Executive dashboard with all KPIs
- Cross-location analytics
- All operational modules (read-only)
- Strategic insights
- User management
- System configuration
PR/Communications team
PR/Communications team
Recommended Role:
pr_comunicacionCan access:- Media center and press kit
- VIP customer management
- Group resources
- Tickets and basic operations
- Marketing campaigns
- Operations/reservations
- HR functions
- Analytics
Platform Admin vs Regular Roles
Platform Admin (Super Admin)
Thesuper_admin role has unrestricted access:
- Create and delete users
- Modify system settings
- Access all modules
- Configure integrations
- Manage locations and brands
frontend/lib/authz.ts:28-40
Regular Roles
All other roles follow permission-based access:- Access is explicitly granted per module
- Cannot modify users or settings
- Limited to their functional area
Best Practices
Principle of Least Privilege
Assign the minimum role needed:
- Don’t give
ceorole just for analytics - Use
operacionesfor daily staff - Reserve
super_adminfor IT/owners
Regular Access Reviews
Review user roles quarterly:
- Remove access for departed employees
- Update roles for promoted staff
- Verify permissions are still appropriate
Document Role Assignments
Keep a record of:
- Who has which role
- Why they were assigned that role
- Date of last review
Separate Operational & Strategic
- Operational staff:
operaciones,marketing - Strategic staff:
ceo - Specialized:
rrhh,pr_comunicacion - System admin:
super_admin
Troubleshooting
User can't access a module
User can't access a module
- Verify their role in Settings > Team
- Check the permission matrix above
- Ensure the module is enabled for that role
- If needed, change their role to one with appropriate access
User sees 'FORBIDDEN' error
User sees 'FORBIDDEN' error
The user’s role lacks the required permission:Solutions:
- Upgrade their role if justified
- Use a different user account with appropriate role
- Contact a Super Admin to adjust permissions
New user can't log in
New user can't log in
Check:
- User received invitation email
- User completed password setup
- Profile was created with correct role
- Account is not deactivated
Need a custom role
Need a custom role
Hiro’s roles are fixed in code. For custom needs:
- Choose the closest existing role
- Use feature flags or settings to fine-tune access
- For major customization, contact support
frontend/lib/roles.ts without developer assistance.Next Steps
Set Up Locations
Configure multi-location access for your team
Configure Automations
Set up automated workflows based on user roles
API Authentication
Learn how to authenticate API requests with roles
Architecture Overview
Understand Hiro’s architecture and security model
