Every driver on TrustRide must be manually verified by a platform administrator before they can publish trips. The admin panel provides a complete user management interface: browsing all accounts, filtering by role or status, reviewing pending verification queues, approving or revoking driver verification, and suspending or reinstating accounts.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Muhammadbugaje/trustride/llms.txt
Use this file to discover all available pages before exploring further.
Browsing Users
GET /control/users/ lists all registered users across every role. The list is ordered by date_joined descending (newest first) and paginates at 25 users per page.
Two filtered shortcut paths are also available:
GET /control/users/riders/— shows only users withrole = "rider"GET /control/users/drivers/— shows only users withrole = "driver"
user_list view and support the following query parameters:
| Parameter | Effect |
|---|---|
q | Full-text search across first name, last name, email, and phone |
role | Filter by rider or driver |
status=suspended | Show only users where is_suspended = True |
status=active | Show only non-suspended, active accounts |
status=unverified | Show only drivers where is_driver_verified = False |
Pending Verifications Queue
GET /control/users/pending/ is the primary driver verification queue. It displays all driver accounts that meet all three of these conditions:
role = "driver"is_driver_verified = Falseis_suspended = False
date_joined (oldest first) so the longest-waiting drivers appear at the top. The page header shows the total count of drivers awaiting review.
This is the recommended starting point for daily verification work. Check this queue each morning to ensure drivers are not left waiting longer than necessary to publish their first trip.
User Detail Page
GET /control/users/<id>/ shows the full profile for any user. The detail page includes:
- All personal fields from the
Usermodel (name, email, phone, gender, role, flags) - The user’s 10 most recent bookings (as rider or as driver on the trip)
- The driver’s 10 most recent trips (only shown when
role = "driver") - The user’s 10 most recent refund requests (as rider or as driver)
Verifying a Driver
POST /control/users/<id>/verify-driver/
Sets is_driver_verified = True on the user record. The view confirms the field was saved successfully (using refresh_from_db()) and logs the outcome. After verification the driver can publish trips and appear in search results.
role = "driver" before making any change. If the user is not a driver, an error message is shown and the admin is redirected back to the pending verifications queue.
When a driver is verified, TrustRide logs the action to the audit log under the
verify_driver action type. No automated email notification is sent to the driver from this view — notify the driver manually via the admin WhatsApp or email configured in platform settings.What to Check Before Verifying
Before clicking verify, open the driver’s detail page and confirm the following:Check the driver's licence
Open the uploaded government-issued driver’s licence image. Verify the name matches the account’s
first_name and last_name. Check that the licence is not expired.Check vehicle registration
Review the uploaded vehicle registration document. Confirm the vehicle make, model, and year match the driver’s registered vehicle in the system.
Validate the plate number
Cross-reference the plate number on the registration document against the
plate_number field on the driver’s vehicle record. TrustRide enforces Nigerian plate number format via the validate_plate_number validator. If the format is wrong, ask the driver to correct it before verifying.Confirm identity
Check that the profile photo (if uploaded) plausibly matches the licence photo. For higher-confidence verification, a second ID document (national ID or international passport) can be requested.
Revoking Driver Verification
POST /control/users/<id>/unverify-driver/
Sets is_driver_verified = False. The driver loses the ability to publish new trips. Any trips already published remain in the system but should be reviewed individually. This action is logged to the audit log under unverify_driver.
Suspending a User
POST /control/users/<id>/suspend/
Suspension sets both is_suspended = True and is_active = False, which prevents the user from logging in. The endpoint rejects attempts to suspend any account with is_staff = True or is_superuser = True.
The reason POST parameter is saved to the audit log.
Cascading effects of suspending a driver:
When a driver is suspended, the platform automatically:
- Cancels all their
draftandpublishedtrips (setsstatus = "cancelled",is_active = False). - Sends a system chat message to every rider with an active booking on those trips, advising them to contact support for a refund.
- Cancels all their
reservedandpending_verificationbookings. - Returns one available seat to the trip for each cancelled booking.
Reinstating a User
POST /control/users/<id>/reinstate/
Sets is_suspended = False and is_active = True, restoring the user’s ability to log in. Previously cancelled trips are not automatically restored — drivers must re-publish trips manually after reinstatement. The action is logged to the audit log under reinstate_user.
Changing a User’s Role
POST /control/users/<id>/change-role/
Changes the user’s role field. The only accepted values are "rider" and "driver". Any other value returns a 400 JSON error. The old and new role are both recorded in the audit log notes.
Changing a user from
rider to driver does not automatically set is_driver_verified = True. The driver must still go through the verification queue before publishing trips.Audit Trail
Every verification action — verify, unverify, suspend, reinstate, change role — is written to theAuditLog table with the following fields:
| Field | Value |
|---|---|
admin | The staff user who performed the action |
action | One of verify_driver, unverify_driver, suspend_user, reinstate_user, change_role |
target_type | "user" |
target_id | The user’s integer primary key |
target_label | Full name and role string (e.g. "Aminu Garba (driver)") |
notes | Reason text or role transition string |
ip_address | The admin’s IP address at time of action |
GET /control/audit/.