Skip to main content
The Roles section (/panel/configuracion/roles) lets you create and manage administrator accounts for the panel. Each account has a set of areas (permissions) that determine which sections of the panel it can access. Records are stored in the admins table with role = 'admin' and deleted = false.
In this system, “Roles” refers to admin panel accounts — not to end-user roles (Student, Teacher, Tutor). Each record in the admins table is an administrator with their own permission set.

Available access areas

Areas are grouped into four categories:

Users

AreaKeyAccess
Teachersusers:teachers/panel/usuarios/maestros
Tutorsusers:tutors/panel/usuarios/tutores
Studentsusers:students/panel/usuarios/alumnos

Classes

AreaKeyAccess
Classesclasses/panel/clases

System

AreaKeyAccess
Containment situationssystem:contention/panel/sistema/contencion
Questionnairesystem:questionnaire/panel/sistema/cuestionario
Promotionssystem:promotions/panel/sistema/promociones
Logssystem:logs/panel/sistema/logs

Configuration

AreaKeyAccess
Generalconfig:general/panel/configuracion
Rolesconfig:roles/panel/configuracion/roles
Backupconfig:backup/panel/configuracion/respaldo
Restore accountconfig:account-restore/panel/configuracion/restaurar-cuentas
If an administrator has all available areas enabled, the panel displays the label Full access instead of listing each permission individually.

Creating an administrator

1

Open the form

Click the Add button in the top-right corner of the Roles page.
2

Fill in personal information

  • Name (required)
  • Last name
  • Email (required, must be unique)
  • Phone (optional)
3

Select access areas

Check the boxes for the panel sections the new administrator should have access to. An administrator with no areas selected cannot see any section.
4

Save

The Save button is enabled when name and email have values. When created, the system automatically generates a temporary password and sends it to the specified email address.

Creation behavior

  • If the email already exists and the record is marked deleted: true, the account is reactivated with the new data.
  • If the email already exists and deleted: false, creation fails with a 409 Conflict error.
  • A welcome email with the generated temporary password is sent on creation.

Create/update endpoint

POST /api/admin/create-update-role
Content-Type: multipart/form-data
FieldTypeDescription
adminJSON stringAdministrator object
Example JSON — create:
{
  "id": null,
  "name": "Ana",
  "last_name": "García",
  "email": "ana@school.edu.mx",
  "phone": "5551234567",
  "areas": ["users:students", "classes", "system:logs"]
}
Example JSON — update:
{
  "id": "existing-uuid",
  "name": "Ana",
  "last_name": "García",
  "email": "ana@school.edu.mx",
  "phone": "5551234567",
  "areas": ["users:students", "classes", "system:logs", "config:backup"]
}
Response:
{
  "success": true,
  "data": {
    "id": "uuid",
    "name": "Ana",
    "last_name": "García",
    "email": "ana@school.edu.mx",
    "phone": "5551234567",
    "areas": ["users:students", "classes", "system:logs"],
    "deleted": false
  }
}

Editing an administrator

Click the gear icon on the row. The modal opens with the current administrator data. Saving updates the row in real time. Editing does not change the administrator’s password.

Deleting an administrator

Click the trash icon and confirm in the alert dialog. The action is a soft-delete on the admins table (the record is marked deleted: true).

Delete endpoint

POST /api/admin/delete-role
Content-Type: multipart/form-data
FieldTypeDescription
recordstring (UUID)ID of the administrator to delete
Response:
{ "success": true }
Deleted administrators lose access to the panel immediately. The protected account admin@montero.com cannot be modified or deleted.

Required permissions

The administrator managing roles must have the config:roles area enabled in their own record.