Skip to main content

Overview

Supervisors have access to the Manage Team section where they can create user accounts, assign roles, change passwords, and delete users. This centralized user management system controls access to all applications within OPS Workspace.

Accessing Team Management

The Manage Team button is only visible to users with the supervisor role:
  1. Log in to OPS Workspace
  2. Navigate to the Cashouts application
  3. Click the πŸ‘₯ Manage Team button in the sidebar
The Manage Team button is automatically hidden for analysts and chat agents based on their role permissions.

Creating New Users

User Creation Form

To create a new user account, fill out the following fields:
FieldDescriptionExample
Full NameUser’s complete nameJuan Perez
UsernameLogin username (lowercase, use dots for spaces)juan.perez
PasswordInitial password (minimum 4 characters)secure123
RoleUser’s role assignmentanalista, supervisor, or chats

API Endpoint

POST /api/users
Content-Type: application/json
Authorization: Bearer {token}

{
  "fullName": "Juan Perez",
  "username": "juan.perez",
  "password": "secure123",
  "role": "analista"
}

Step-by-Step Instructions

1

Enter Full Name

Type the user’s complete name in the Nombre Completo field (e.g., β€œJuan Perez”)
2

Set Username

Create a unique username in the Usuario de acceso field (e.g., β€œjuan.perez”)
3

Assign Password

Enter a temporary password in the ContraseΓ±a field (minimum 4 characters)
4

Select Role

Choose the appropriate role from the dropdown:
  • Analista: Standard cashout reviewer
  • Supervisor: Team manager with admin access
  • Chats: Chat support agent (no cashout access)
5

Create Account

Click the Crear Cuenta button to create the user
New users can log in immediately using their assigned username and password. Credentials are case-sensitive.

Managing Existing Users

User Table

The user management table displays all registered users with the following information:
  • Name: Full name of the user
  • Username: Login username
  • Role: Assigned role (color-coded badge)
  • Actions: Password reset and delete buttons

Changing User Passwords

Supervisors can reset passwords for any user:
  1. Click the πŸ”‘ Clave button next to the user
  2. Enter the new password in the prompt (minimum 4 characters)
  3. Click OK to confirm
API Endpoint:
PUT /api/users/{userId}/password
Content-Type: application/json
Authorization: Bearer {token}

{
  "newPassword": "newSecurePassword"
}
Inform users of their new password through a secure channel (not email or public chat).

Deleting Users

Deleting a user is permanent and cannot be undone. The user will immediately lose access to all OPS Workspace applications.

Delete Process

  1. Click the πŸ—‘οΈ Borrar button next to the user
  2. Confirm the deletion in the popup dialog
  3. The user is permanently removed from the system
API Endpoint:
DELETE /api/users/{userId}
Authorization: Bearer {token}

Deletion Restrictions

  • The admin user cannot be deleted (button is disabled)
  • Active sessions are terminated immediately upon deletion
  • User data in cashout history remains intact (for audit purposes)
Deleted users are removed from the system but their name remains in historical cashout records to maintain data integrity.

Role-Based Visibility

Role Assignment Options

When creating users, supervisors can assign one of three roles:
// Available roles in the system
<select id="newRole">
  <option value="analista">Analista</option>
  <option value="supervisor">Supervisor</option>
  <option value="chats">Chats</option>
</select>

Role Descriptions

Analista

Standard cashout reviewer with access to submit and review cashouts

Supervisor

Team manager with access to user management and all cashout functions

Chats

Chat support agent with access only to Operapedia (no cashout access)

User Table Reference

API Endpoint:
GET /api/users
Authorization: Bearer {token}

// Response:
{
  "data": [
    {
      "_id": "507f1f77bcf86cd799439011",
      "fullName": "Juan Perez",
      "username": "juan.perez",
      "role": "analista"
    }
  ]
}

Example User Management Code

// Load all users
async function cargarUsuarios() {
  const res = await apiFetch(`/users`);
  const json = await res.json();
  const tbody = document.getElementById('usersTableBody');
  
  tbody.innerHTML = json.data.map(u => `
    <tr>
      <td>${u.fullName}</td>
      <td>${u.username}</td>
      <td>
        <span class="badge-${u.role}">${u.role}</span>
      </td>
      <td>
        <button onclick="cambiarPasswordUsuario('${u._id}', '${u.username}')">πŸ”‘ Clave</button>
        <button onclick="eliminarUsuario('${u._id}')" ${u.username === 'admin' ? 'disabled' : ''}>πŸ—‘οΈ Borrar</button>
      </td>
    </tr>
  `).join('');
}

Best Practices

Use lowercase usernames with dots separating first and last names:
  • βœ… juan.perez
  • βœ… maria.garcia
  • ❌ JuanPerez
  • ❌ juan_perez
  • Set temporary passwords during account creation
  • Instruct users to change passwords after first login
  • Use minimum 4 characters (8+ recommended)
  • Reset passwords immediately if compromised
  • Start new users as analista role
  • Promote to supervisor after training period
  • Use chats role only for support agents
  • Regularly audit user roles for accuracy

Troubleshooting

Each username must be unique in the system. Try adding middle initials or numbers (e.g., juan.perez2).
  • Verify username and password are case-sensitive
  • Check that the user’s role has access to the application
  • Confirm the account was successfully created in the user table
The admin user cannot be deleted for security reasons. This is an intentional system protection.

Permissions

Learn about role-based permissions and access control

Authentication

Understand how user authentication works

Build docs developers (and LLMs) love