Troubleshooting Roles & Permissions
Common issues and solutions for roles and permissions
Troubleshooting Roles & Permissions
This guide covers common issues you may encounter when working with roles and permissions in Rahal.
Permission Issues
User Cannot Access a Feature
Symptom: User sees "403 Forbidden" or feature is not visible in the dashboard.
Diagnosis:
- Check what permission the feature requires
- Check the user's assigned role
- Verify the role includes that permission
Solutions:
| Cause | Solution |
|---|---|
| Missing permission in role | Add the permission to the role |
| Wrong role assigned | Change user's role assignment |
| Role is inactive | Reactivate the role |
| User not logged into dashboard | Ensure dashboard login, not app login |
User Has Permission But Feature Still Hidden
Symptom: Role has the permission, but user can't access the feature.
Diagnosis:
- Have user log out and log back in
- Clear browser cache
- Check if feature requires multiple permissions
Common multi-permission requirements:
| Feature | Required Permissions |
|---|---|
| Roles page | Access Company Dashboard + Read Company Roles |
| Create role | Read Company Roles + Write Company Roles |
| Delete role | Read Company Roles + Delete Company Roles |
| User management | Access Company Dashboard + Read Users |
Permission Change Not Taking Effect
Symptom: Role permissions were changed but user still has old access.
Diagnosis:
- Verify the role was saved successfully
- Check user is assigned the modified role
- Have user refresh the page
Solutions:
- Refresh the browser (F5 or Cmd+R)
- Log out and log back in
- Clear browser cache if problem persists
- Verify the change in the database
Permission changes should take effect immediately. If they don't, the most likely cause is browser caching or an unsaved change.
Role Creation Issues
"Role with code already exists"
Symptom: Error when creating a role with a name similar to an existing role.
Cause: Role codes are generated from names and must be unique per company.
Solutions:
| Scenario | Solution |
|---|---|
| Different role, similar name | Modify the name slightly (e.g., "Travel Coordinator EMEA") |
| Duplicate role intended | Not needed — assign existing role |
| Deleted role being recreated | System may restore old role — this is expected |
Example code conflicts:
| Name 1 | Name 2 | Conflict? |
|---|---|---|
| Travel Coordinator | Travel Coordinator | Yes |
| Travel Coordinator | Travel-Coordinator | Yes |
| Travel Coordinator | Travel Coord | No |
"Reserved code" Error
Symptom: Error when using names that generate reserved codes.
Cause: MEMBER, MANAGER, ADMIN are reserved for predefined roles.
Examples of problematic names:
- "Member" → MEMBER (reserved)
- "Manager" → MANAGER (reserved)
- "Admin" → ADMIN (reserved)
- "System Admin" → SYSTEM_ADMIN (allowed)
Solutions:
- Use more descriptive names: "Team Member", "Department Manager", "Company Admin"
- Add prefixes or suffixes to avoid reserved codes
"At least one permission is required"
Symptom: Cannot save role without permissions selected.
Cause: Every role must have at least one permission.
Solution: Select at least one permission from the permission matrix before saving.
Role Deletion Issues
"Cannot delete role: X users are currently assigned"
Symptom: Cannot delete a custom role because users are assigned to it.
Diagnosis:
- Note the number of users mentioned
- Find these users in the Users list
- Reassign them to different roles
Solution:
- Go to Users
- Filter or search for users with the role
- Edit each user and assign a different role
- Return to Roles and retry deletion
"Predefined roles cannot be deleted"
Symptom: Delete button missing or error when trying to delete Member, Manager, or Admin.
Cause: Predefined roles are permanent and cannot be deleted.
Workaround: If you don't want to use a predefined role:
- Simply don't assign users to it
- Create custom roles for your needs
- Predefined roles won't affect users not assigned to them
Role Assignment Issues
Cannot Find Role in Dropdown
Symptom: When editing a user, expected role is not in the dropdown.
Possible causes:
| Cause | Solution |
|---|---|
| Role is inactive | Reactivate the role |
| Role is in different company | Check company context |
| Role was deleted | Create a new role |
| Role not yet created | Create the role first |
"Role does not belong to this company"
Symptom: Error when trying to assign a role to a user.
Cause: Roles are company-scoped; you're trying to assign a role from a different company.
Solution:
- Verify you're editing a user in the correct company
- Verify you're selecting a role from the correct company
- Check your company context in the dashboard
User Has Wrong Permissions Despite Role
Symptom: User's access doesn't match their assigned role.
Diagnosis:
- Check the user's actual role assignment (not assumed)
- Check the role's actual permissions
- Verify no database-level overrides
Common mistakes:
- Assuming role from email domain (roles must be explicitly assigned)
- Confusing predefined role names with custom roles of similar names
- Multiple users with similar names — check correct user
Predefined Role Issues
Predefined Roles Missing
Symptom: Company doesn't have Member, Manager, Admin roles.
Cause: Predefined roles weren't initialized when company was created.
Solution (Platform Admin):
- Go to Company Roles
- Click Init Predefined Roles
- Select the company
- Click Create Roles
"Predefined roles already exist"
Symptom: Error when trying to initialize predefined roles.
Cause: Roles were already initialized for this company.
Solution: No action needed — the roles already exist. Refresh the page and you should see them.
Cannot Edit Predefined Role Permissions
Symptom: Permission checkboxes are disabled for Member, Manager, or Admin roles.
This is expected behavior. Predefined role permissions are fixed and cannot be changed.
Workaround: Create a custom role with the permissions you need.
Dashboard Access Issues
User Cannot Log Into Dashboard
Symptom: User credentials work for app but not dashboard.
Diagnosis:
- Check if user has Access Company Dashboard permission
- Check user's role
Permission check:
- Member role: No dashboard access
- Manager role: Dashboard access
- Admin role: Dashboard access
- Custom roles: Check if Access Company Dashboard is included
Solution:
- Assign user to Manager, Admin, or a custom role with dashboard access
- Or add Access Company Dashboard to their current role (if custom)
Dashboard Sidebar Missing Items
Symptom: User can access dashboard but some menu items are missing.
Cause: Menu items are hidden if user lacks required permission.
Common missing items and their permissions:
| Menu Item | Required Permission |
|---|---|
| Users | Read Users |
| Roles | Read Company Roles |
| Policies | Read Policies |
| Budgets | Read Budgets |
| Booking Requests | Read Booking Requests |
| Delegations | Read Delegations |
Multi-Company Issues
User Has Different Access in Different Companies
Symptom: User reports different access levels in different companies.
This is expected behavior. Users can have different roles in different companies.
Verification:
- Check user's role in Company A
- Check user's role in Company B
- Roles can be completely different
Roles from One Company Appearing in Another
Symptom: Seeing roles from wrong company.
Cause: Company filter not set correctly.
Solution:
- Check the company context in the dashboard header
- Use the company filter on the Roles page
- Ensure you're viewing the intended company
Performance Issues
Roles Page Loading Slowly
Possible causes:
- Large number of roles
- Network latency
- Database query optimization
Workarounds:
- Use filters to reduce results
- Use search to find specific roles
- Contact support if persistently slow
Permission Check Errors in Console
Symptom: Browser console shows permission errors.
This may be normal. The UI preemptively hides elements you don't have access to. Some console errors are expected when permissions are checked.
When to investigate:
- If feature should work but doesn't
- If errors appear during normal operations
- If errors correlate with visible bugs
Getting Help
If you can't resolve an issue:
-
Document the problem:
- Exact error message
- Steps to reproduce
- User's current role
- Expected vs actual behavior
-
Check logs:
- Browser console for client errors
- Backend logs for server errors
-
Contact support:
- Provide documentation above
- Include user ID and company ID if possible
- Screenshots are helpful