Overview
By the end of this guide, you will understand how to create new users, assign roles and supervisors, manage user profiles, and deactivate users when needed. The platform supports three user roles: Admin, Supervisor, and Credit Officer, each with specific permissions and responsibilities.Understanding User Roles
Before creating users, it’s important to understand the three user roles:| Role | Permissions | Use Case |
|---|---|---|
| ADMIN | Full system access, can manage all users, configure settings, delete records | System administrators |
| SUPERVISOR | Manages Credit Officers, approves loans, generates reports | Team leaders managing field staff |
| CREDIT_OFFICER | Day-to-day operations, creates loans, records repayments | Field staff working with unions |
Each Credit Officer can be assigned to a Supervisor. This creates a reporting hierarchy that enables supervisor reports and approval workflows.
Creating a New User
Navigate to User Management
From the sidebar menu:
- Click “User Management”
- Click “Users”
Fill in Required Information
Complete the user creation form with the following required fields:
| Field | Description | Required | Format |
|---|---|---|---|
| First Name | User’s first name | ✅ Yes | Text |
| Last Name | User’s last name | ✅ Yes | Text |
| Login email address (must be unique) | ✅ Yes | Valid email | |
| Password | Initial password for the user | ✅ Yes | Min 6 characters |
| Role | User role in the system | ✅ Yes | ADMIN, SUPERVISOR, or CREDIT_OFFICER |
| Phone | Contact phone number | Optional | Text |
| Address | Physical address | Optional | Text |
Assign Supervisor (Credit Officers Only)
If you’re creating a Credit Officer, you’ll see an additional field:
- Supervisor: Select which Supervisor this Credit Officer reports to
- Is only available when Role is set to
CREDIT_OFFICER - Allows Supervisors to see this officer’s loans and performance
- Enables the approval workflow (officers submit, supervisors approve)
Assigning and Changing Supervisors
You can assign or reassign supervisors for Credit Officers at any time.Locate the Credit Officer
- Go to User Management → Users
- Find the Credit Officer you want to assign
- Use the search box if needed to find them quickly
Select Supervisor
In the edit form:
- Locate the Supervisor dropdown
- Select the new supervisor from the list
- Only users with role
SUPERVISORwill appear in this list
To remove a supervisor assignment, select the empty option or “None” from the dropdown. This will set the
supervisorId to null.Managing User Profiles
Administrators can update user information at any time.Navigate to the User
- Go to User Management → Users
- Find the user in the list
- Click the Edit icon (pencil)
Update Profile Information
You can modify:Personal Information:
- First Name
- Last Name
- Phone number
- Address
- Email address (must remain unique)
- Role (ADMIN, SUPERVISOR, CREDIT_OFFICER)
- Supervisor assignment (for Credit Officers)
- Active status (see Deactivating Users)
- Upload a new profile image
- Remove existing profile image by setting
removeProfileImagetotrue
Resetting User Passwords
As an administrator, you can reset passwords for any user.Access Password Reset
- Open the user’s details by clicking on their name or the View icon
- Look for the “Reset Password” button
- Click the button to open the password reset dialog
Deactivating Users
Instead of deleting users (which can affect data integrity), you should deactivate them.Toggle Active Status
- Find the “Active” or “isActive” toggle
- Switch it to OFF or set
isActivetofalse - Click “Save Changes”
Checking User Dependencies
Before deleting a user, check if they have associated records.Access Dependency Check
Use the API endpoint
GET /api/users/:id/dependencies or click the “Check Dependencies” button in the user details view.Review Dependencies
The system will show:
- Number of unions managed (for Credit Officers)
- Number of loans created
- Number of repayments recorded
- Number of supervised officers (for Supervisors)
According to user.controller.ts:199-206, this information helps you decide whether to delete or deactivate a user.
Viewing User Activity
Track user login history and activity:- Navigate to the user’s profile
- View the following information:
- Last Login: When they last accessed the system (
lastLoginAt) - Last Activity: Most recent action timestamp (
lastActivityAt) - Login Count: Total number of logins (
loginCount)
- Last Login: When they last accessed the system (
User Filtering and Search
The users list supports powerful filtering:| Filter | Description | Values |
|---|---|---|
| Search | Search by name or email | Text input |
| Role | Filter by user role | ADMIN, SUPERVISOR, CREDIT_OFFICER |
| Active Status | Show active or inactive users | True/False |
| Supervisor | Filter officers by their supervisor | Supervisor ID |
API Reference
For developers integrating with the user management system:Related Features
- Loan Processing Guide - Learn how Credit Officers create loans
- Reporting & Analytics - Understand supervisor reports
- Roles & Permissions - Detailed role capabilities
