User Management Overview
Manage users, assign reports, configure filters, and manage technical user relationships.List Users
Retrieve all users with their reports and roles.Authentication & Permissions
Valid session or Sanctum token
super-adminroleuser.indexpermissionuser.createpermissionuser.updatepermissionuser.destroypermission
Response
Returns Inertia view with:Array of users with reports and roles relationships
All available roles
All available reports
Users with ‘tecnico’ or ‘técnico’ role
User Object Structure
User ID
Full name
Username for authentication
Email address
User type (admin, designer, customer, etc.)
National ID number
Sales representative code
LDAP authentication status
Assigned reports
Assigned roles
Get User Details
Retrieve detailed information about a specific user.Path Parameters
User ID
Response
Returns Inertia view with:User with roles, permissions, reports, and technical users
All available roles
All available reports
All available report filters
Available technical users
Example Request
Create User
Create a new user with roles and report assignments.Request Body
User’s full name
Unique username
Valid email address
User password (will be hashed)
User type
National ID number
Sales representative code
Array of role names to assign
Array of report IDs to assign
Array of technical user IDs (for ‘asesor’ role)
Example Request
Response
Returns array of all users with relationships (200 status).Technical Users (Asesor Role)
When a user is assigned the “asesor” role:- The
technical_usersarray is synchronized in theadvisor_technical_userpivot table - Only users with ‘tecnico’ or ‘técnico’ roles can be assigned
- Invalid technical user IDs are filtered out
Update User
Update an existing user.Path Parameters
User ID to update
Request Body
Same fields as create (all optional except roles):Updated name
Updated username
Updated email
Updated type
Updated cedula
Updated sales code
Updated roles array
Set to true to update password
New password (required if change_password=true)
Updated technical users (for asesor role)
Example Request
Response
Returns array of all users with updates applied (200 status).Delete User
Delete a user from the system.Path Parameters
User ID to delete
Example Request
Response
Returns array of remaining users (200 status).Update User Reports
Update report assignments for a user.Request Body
User ID
Array of report IDs to assign
Example Request
Response
Update User Report Filters
Update filter assignments for a user’s report.Request Body
User ID
Report ID
Array of filter IDs to assign to this user-report combination
Example Request
Response
Set Default Report View
Set whether a report should be shown by default for a user.Request Body
User ID
Report ID
Show state (true/false)
Example Request
Response
Error Responses
500 Internal Server Error
403 Forbidden
Implementation Notes
Source:app/Http/Controllers/UserController.php
All user operations use database transactions for data integrity.