User Role Mapping
The User Role Mapping module (also known as Access Management) is the central command station where you determine exactly who has access to what within your organization.
Why This Page Exists
In any growing organization, employees change departments, new people are hired, and contractors need temporary access. Without a centralized "mapping" system, administrators would have to manually open every single user's profile and check or uncheck hundreds of individual permissions. This would be tedious, error-prone, and a massive security risk.
User Role Mapping solves this by using a Role-Based Access Control (RBAC) model.
Instead of configuring permissions for people, you configure permissions for roles. Then, you simply drop people into the appropriate role.
Because of this, managing access becomes infinitely easier and safer:
- When an employee joins, you assign them one role, instantly giving them exactly what they need.
- When an employee leaves, you remove them from the role, instantly revoking everything.
- When a team needs a new tool, you add the permission to their role once, and everyone on the team gets it simultaneously.
From Employee Joining to Feature Access
Understanding the lifecycle of an employee's access will make using this page intuitive.
- Employee Joins: A new person is hired.
- User Account Created: They are invited to the platform.
- Administrator Chooses Role: An admin looks at the available roles (e.g., Finance, Marketing).
- User is Mapped to Role: The admin uses the User Role Mapping page to assign the employee to that role.
- Role Contains Permissions: The role already contains a pre-approved list of permissions.
- Permissions Determine Capabilities: The platform's security system reads these permissions.
- Employee Works Securely: The employee is granted access to the specific modules and buttons they need, while everything else remains hidden and protected.
The Mental Model: Three Connected Columns
To use this page effectively, you must understand the relationship between the three main columns you see on the screen.
- ROLE (Left) = What kind of access group are we managing?
- ASSIGNED MEMBERS (Middle) = Which people currently belong to that group?
- PERMISSIONS (Right) = What are those people allowed to see and do?
📸 Screenshot placeholder: URM-01
Capture: Open User Role Mapping. Do not select a role yet.
Suggested caption: The User Role Mapping page acts as a three-column control center for organizational access.
Roles & Permissions vs User Role Mapping
It is very common to confuse the Roles & Permissions page with the User Role Mapping page.
- Roles & Permissions is where you build the blueprint. You define what the roles are and what they should do.
- User Role Mapping is where you execute the blueprint. You connect actual, living people to those roles and inspect their access.
| Feature | Roles & Permissions | User Role Mapping |
|---|---|---|
| Primary focus | Creating the roles | Assigning people to roles |
| Create a new role | ✅ Yes | ✅ Yes (Quick add) |
| Delete a role | ✅ Yes | ✅ Yes (If zero members) |
| Assign users to a role | ❌ No | ✅ Yes |
| View which users have a role | ❌ No | ✅ Yes |
| Manage permissions for a role | ✅ Yes | ✅ Yes |
Field & Control Reference
Here is a quick reference guide to every major button and control on the page.
| UI Element | Purpose | When to Use | Result |
|---|---|---|---|
| Roles List (Left) | Lists all access groups | To inspect a specific access profile | Loads members and permissions in the other columns |
| + (Plus) Button (Members) | Assign a user | When a new employee needs access | User is added to the role |
| Trash Icon (Members) | Revoke access | When an employee changes teams | User loses all role permissions immediately |
| Search Permissions | Find a capability | When dealing with large permission lists | Instantly filters visible permissions |
| Category Filter | Narrow modules | When focusing on a specific area (e.g., Security) | Hides unrelated categories from the list |
| Checkbox (☑/☐) | Grant/revoke capability | When tweaking a role's access | Marks the permission as changed (unsaved) |
| Select All / Deselect All | Bulk manage a module | When granting full access to a specific tool | Instantly checks/unchecks all permissions in that module |
| Save Button | Persist changes | After modifying checkboxes | Updates the role's permissions permanently |
Adding and Managing Members
How to Assign an Employee to a Role
- Select the desired role in the Roles (left) column.
- In the Assigned Members (middle) column, click the + (Plus) button at the top right.
- A dropdown menu appears showing a list of users who do not currently have this role.
- Use the Search bar to find a specific person by name or email.
- Click their name to confirm the assignment.
📸 Screenshot placeholder: URM-02
Capture: Click on a standard custom role (e.g., "Finance Team").
Suggested caption: Selecting a role instantly reveals who has it and what they can do.
📸 Screenshot placeholder: URM-03
Capture: Click the + button in the Assigned Members column.
Suggested caption: Searching and adding an employee to the selected role.
⚙️ What happens behind the screen?
- User View: The user's name immediately appears in the middle column under the role.
- System View: The system fires an API request (
PUT /org/users) to overwrite the user'srole_id. Because users can only have one primary role, assigning a user automatically strips them of any previous role they had.
Removing a Member from a Role
- Select the role they currently belong to.
- Find their name in the middle column.
- Click the Trash icon next to their name.
- Confirm the warning prompt.
📸 Screenshot placeholder: URM-09
Capture: Click the Trash icon next to a member's name.
Suggested caption: Confirming the removal of an employee from a role.
Removing a member strips them of their role entirely. They instantly lose all permissions associated with that role. If they are actively logged in, menu items and modules will disappear from their screen upon their next navigation or refresh.
⚙️ What happens behind the screen?
- User View: The user vanishes from the middle column.
- System View: The system fires an API request (
PUT /org/users) setting theirrole_idtonull.
The "No Users Assigned" State
If you select a role and the middle column says "No users assigned", it is a completely normal state. It simply means the role is dormant.
📸 Screenshot placeholder: URM-04
Capture: Select a role that has zero members.
Suggested caption: A dormant role with zero assigned members.
An empty role does not grant access to anyone until users are assigned. It acts as a standby template.
Managing Permissions
The right column allows you to edit the exact capabilities assigned to the role.
Checking and Unchecking
- Click a checkbox to grant (☑) or revoke (☐) a capability.
- Saving: Changes are not automatically saved. When you make a change, a Save button will appear at the top of the column. You must click Save to apply the changes to the database.
📸 Screenshot placeholder: URM-05
Capture: Check or uncheck a single permission. Do not save yet.
Suggested caption: Unsaved permission changes reveal a Save button.
Changing permissions affects every single member assigned to the selected role. Review the Assigned Members list carefully before saving broad permission changes.
Searching and Filtering
If your organization has many modules, finding a specific permission can be overwhelming.
- Search Bar: Type a word (like "invoice"). The system filters instantly. It searches the permission description, code, module name, and category.
- All Categories Dropdown: Use this to hide unrelated modules. Selecting "Security" will hide all Marketing and Finance modules.
📸 Screenshot placeholder: URM-06
Capture: Type a keyword into the permission search bar.
Suggested caption: Filtering the massive permission list using a simple keyword search.
Select All / Deselect All
When you expand a module (e.g., "Orbit Assistant"), you will see a Select All button.
- Clicking this instantly checks every permission within that specific module only. It does not check every permission in the entire organization.
- If all permissions are already checked, it turns into a Deselect All button.
📸 Screenshot placeholder: URM-08
Capture: Expand a module block in the permissions list.
Suggested caption: Quickly granting full access to a specific module using Select All.
The Owner / Administrator Role (Special Behaviour)
You will notice a role on the left labeled with an Admin badge (often called "Owner" or "Super Admin"). This role behaves very differently from custom roles to protect the security of your organization.
Administrator Full Access
When you select the Owner role, the right permissions column becomes faded out and completely unclickable. A warning message appears stating: "Administrator role — full access".
📸 Screenshot placeholder: URM-07
Capture: Select the Owner / Admin role.
Suggested caption: The Owner role bypasses permission checks entirely and cannot be edited.
Why is it disabled? This is an intentional security safeguard. The system Owner automatically bypasses all permission checks. They have access to every feature currently in the platform, and every feature that will ever be added. Because they have universal access, checkboxes are irrelevant and locked to prevent accidental lockouts.
"Owner Only" Member Assignment
If you are logged in as a standard administrator (not the ultimate Organization Owner), the + button in the Assigned Members column disappears when the Owner role is selected. Instead, you see a padlock reading "Owner only".
Only the literal Organization Owner (or a platform Super Admin) is allowed to add new members to the Owner role. This prevents lower-level administrators from escalating their own privileges.
Common Scenarios
Here are some realistic business examples of how this page is used.
Scenario 1: The New Finance Employee
A new employee joins the Finance department.
- The administrator selects the Finance role.
- They click + and assign the new employee.
- The employee inherits all Finance permissions instantly, allowing them to view expenses and budgets without the administrator ever needing to check a single permission box.
Scenario 2: An Employee Changes Departments
An employee transfers from Marketing to Finance.
- The administrator selects the Finance role.
- They click + and assign the employee.
- What happens? The system automatically removes the employee from the Marketing role and applies the Finance role. The employee loses access to the CRM and gains access to the budget tools immediately.
Scenario 3: Temporary Roles With No Members
You create a "Summer Intern" role in January and configure all the permissions. The role sits at "0 Members" until June. This is perfectly normal and safe—nobody has the access until you assign the interns in June.
Scenario 4: Creating a Read-Only Team
You create an "Auditor" role. You go through the Permissions column and only check boxes that start with "View" or "Read", leaving all "Delete" and "Create" boxes unchecked. You save the role. When you assign external auditors to this role, they can look at data but physically cannot change anything.
Before You Change Permissions Checklist
Before clicking the Save button on permission changes, quickly run through this mental checklist:
- Confirm correct role: Look at the left column. Is the correct role highlighted in blue?
- Check Assigned Members: Look at the middle column. Are you okay with all of these people receiving this change?
- Verify the Action: Are you checking (granting) or unchecking (revoking)?
- Review Bulk Actions: If you used "Select All", are you sure you want them to have Delete/Destructive permissions for that module?
Troubleshooting
| Problem | Possible Reason | What to Check / Do |
|---|---|---|
| I added someone but cannot find them in the list. | They might be assigned to a different role. | Use the search bar in the user assignment dropdown. If they are in another role, reassign them. |
| I cannot edit Owner permissions. | It is a protected system role. | This is intentional. Owner roles bypass all permission checks and are permanently locked. |
| The + button is missing. | You selected the Owner role, but you are not the Organization Owner. | Look for the "Owner Only" warning. Only the true Organization Owner can assign other Owners. |
| I changed a checkbox but nothing happened. | You forgot to save. | Changing a checkbox marks the page as "dirty". You must click the Save button at the top to apply changes. |
| I tried to select a different role but got a popup warning. | You have unsaved permission changes. | The system protects you from losing work. Click "Cancel", then click Save, then switch roles. |
| I cannot delete a role. | The role still has assigned members, or it is a system role. | Look at the middle column. If there are members, remove them first. (System roles can never be deleted). |
📸 Screenshot placeholder: URM-12
Capture: Attempt to switch roles while having unsaved permission changes.
Suggested caption: The system warns you if you attempt to leave without saving your permission changes.
FAQ
Can one user have multiple roles?
No. In Orbit Resolve, a user has exactly one primary organization role. Assigning a new role automatically replaces their previous role.
Do permission changes save automatically?
No. You must click the Save button.
What does Select All do?
It checks every permission within that specific module block (e.g., General Profile). It does not check every permission in the entire system.
What happens if I change permissions for a role with many users?
The change applies to all of them instantly. The next time they refresh their browser or navigate to a new page, the UI will update to reflect their new capabilities.
Technical Reference — Developers & QA
This section contains implementation details verified directly from OO-frontend source code (/src/routes/org/OrgAccessPage.tsx).
Implementation Details
- Route Registration: Mapped to
/org/userroleinAppRoutes.tsxandmenu-overrides.ts. Protected by theorg.userrolesmap.viewpermission hook. - Component:
OrgAccessPage.tsx. It handles its own complex state (roles, users, matrix, expanded modules, search queries). - Role Selection Logic: Clicking a role triggers an API call (
GET /org/roles/permissions?id={id}) to hydrate the checkboxes. It also filters the globalusersarray locally to populate the middle column. - Dirty State Handling: The
isDirtystate tracks unsaved permission toggles. IfisDirtyis true and a user clicks a different role, awindow.confirmdialog intercepts the navigation to prevent data loss. - Owner/Admin Protection: Roles with
is_org_adminoris_system_roledisable the permission UI completely. Furthermore, member assignment to these roles is restricted locally by comparing the logged-in user's ID againstorgOwnerId(fetched fresh fromGET /org/usersto prevent stale JWT token spoofing).
API Interactions
| Action | Method | Endpoint | Trigger | Result |
|---|---|---|---|---|
| Load Roles | GET | /org/roles | Page mount | Populates left column. |
| Load Matrix | GET | /org/roles/matrix | Page mount | Populates right column structure. |
| Load Users | GET | /org/users | Page mount | Populates middle column & gets Org Owner ID. |
| Load Permissions | GET | /org/roles/permissions?id={id} | Selecting a role | Populates active checkboxes. |
| Save Permissions | POST | /org/roles/permissions?id={id} | Clicking Save | Submits array of permission UUIDs. |
| Assign Member | PUT | /org/users?id={user_id} | Clicking a user in + dropdown | Payload: { role_id: new_role_id }. Overwrites previous role. |
| Remove Member | PUT | /org/users?id={user_id} | Clicking Trash on a member | Payload: { role_id: null }. Revokes role. |
| Delete Role | DELETE | /org/roles?id={id} | Clicking Trash on a role | Removes role (blocked by backend if user_count > 0). |
QA Verification Checklist
When testing this component, ensure the following flows are verified:
- Role Selection: Clicking different roles updates the member list and fetches the correct permissions.
- Dirty State Interception: Toggling a permission and clicking a different role triggers a confirmation warning.
- Member Assignment: Assigning a user successfully updates the UI and removes them from the available users dropdown.
- Member Removal: Clicking trash successfully removes the member and handles the API response gracefully.
- Select All / Deselect All: Verifying the toggle correctly adds/removes exactly the UUIDs for that specific module block to the payload.
- Search & Filter: Search string matches against description, code, module name, and category name simultaneously.
- Owner Role Protections: The UI correctly locks permissions for
is_org_admin. The+member button is hidden unless the active session matchesorgOwnerIdor is a Super Admin. - Empty State: A role with zero users displays the "No users assigned" graphic rather than breaking or showing a blank column.
Downstream Impact
Changes made on this page propagate globally:
- User Role Mapping assigns the
role_idto a User. - Role Permissions link the
role_idto specific permission codes (e.g.,org.users.view). - Frontend Permission Checks (e.g.,
hasPermission()fromuseAuthStore) evaluate these codes locally. - Menu / Page / Action Availability: If a permission is revoked here, the
ProtectedRoutewrappers andmenu-overrideswill instantly unmount the components, hiding navigation items and blocking route access on the client.