Assign Role
API ENDPOINT
/assign-role
##Navigation Path
Dashboard → Assign Role
Overview
The Assign Role page is used to assign system roles to employees after they are created. This page connects Employees, Roles, Permissions, Companies, and Branches to control what each user can access within the application.
Only Super Admin users can access and manage this page.
Access Control
- Accessible By: Super Admin only
- Restricted For: All other roles
Purpose of Assign Role
This page allows the Super Admin to:
- Create login credentials for employees
- Assign roles (Super Admin / User / Custom roles)
- Control salary visibility
- Restrict users to specific companies and branches
- Manage user access centrally
Assign Role Form
The top section of the page contains a form used to assign roles to an employee.
1. Name
- Field Type: Text
- Description: Enter the employee’s full name
- Mandatory: Yes
2. Email ID
- Field Type: Email
- Description: Login email for the employee
- Mandatory: Yes
- Usage: Used as username for authentication
3. Phone Number
- Field Type: Number
- Description: Employee contact number
- Mandatory: Yes
4. Role
- Field Type: Dropdown
- Description: Select the role to assign
- Options:
- superAdmin
- user
- Custom roles created in Role & Permission
5. View All Salary Processes
- Field Type: Checkbox
- Description:
If enabled, the employee can view salary processing data across all branches. - Default: Disabled
6. Company
- Field Type: Multi-select dropdown
- Description:
Select the company or companies the employee belongs to. - Mandatory: Yes
7. Password
- Field Type: Auto-generated
- Description:
Password for the employee login. - Action:
Clicking Generate creates a secure system password automatically.
8. Branch Selection
- Field Type: Multi-select list with search
- Features:
- Search branches by name or code
- Select / Deselect all
- Scrollable list
- Description:
Determines which branches the employee can access.
Actions (Form)
Generate
- Generates a secure password automatically
Save / Submit
- Creates the user
- Assigns role and permissions
- Saves company and branch mappings
Close
- Exits the form without saving changes
Assigned Users List
Below the form, the page displays a table of all assigned users.
Table Columns
| Column Name | Description |
|---|---|
| S.No | Serial number |
| Name | Employee name |
| Login email | |
| Phone | Contact number |
| View All Salary Process | Salary access status |
| Role | Assigned role |
| Actions | Edit / Assign / Delete |
Table Filters
Each column supports:
- Text-based search
- Quick filtering
- Sorting (where applicable)
Actions in User List
Edit
- Modify employee role
- Update company or branch access
- Change salary visibility
Assign Role
- Reopen role assignment form
- Update permissions or role mapping
Delete
- Removes user access from the system
- Does not delete employee master data
Business Rules
- One employee can have only one role at a time
- Branch access depends on selected companies
- Salary visibility is role + checkbox based
- Super Admin role has unrestricted access
Security & Audit
- All role assignments are logged in System Logs
- Changes are traceable by:
- User
- Date
- Action performed
Related Pages
- Pages Management
- Role & Permission
- Assign Role
- System Logs
Summary
The Assign Role page acts as the final control point in user access management. It ensures that every employee has:
- Correct role
- Proper permission scope
- Restricted company & branch access
- Secure authentication credentials
This page is essential for maintaining security, data isolation, and role-based access control (RBAC) within the system.