UniEvents uses a role-based access control (RBAC) model with five distinct roles. Each role determines which portal the user can access, which tenants’ data they can see, and which operations they can perform. Superadmin accounts manage the full user directory fromDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Edfermachado/proyectoSistemas/llms.txt
Use this file to discover all available pages before exploring further.
/admin/users, while faculty admins create and manage their own sub-team from /faculty-admin/managers.
User Roles
Therole column on the users table is a plain varchar. The five supported values are:
| Role | Scope | Portal |
|---|---|---|
superadmin | Full access to all universities, tenants, users, and settings. tenantId is null. | /admin |
tenant_admin | Full access to their assigned faculty tenant — spaces, events, managers, and reports. | /faculty-admin |
event_manager | Can create and manage events within their tenant. | /faculty-admin |
access_control | Can scan QR tickets and validate attendees at event entrances. | /faculty-admin |
user | End-user account. Can browse events, register, and manage their own tickets. | / (public portal) |
tenantId foreign key in the users table links tenant_admin, event_manager, and access_control accounts to a specific faculty. It is null for superadmin and typically null for user accounts as well.
User Personal Information
The schema for theusers table stores the following personal fields:
organizerLevel enum has three values: academico, amateur, and registrado.
Creating Users (Superadmin)
Superadmins can create accounts of any role from the admin portal.Click Nuevo Administrador
Click the Nuevo Administrador button (top-right). This navigates to
/admin/users/new.Fill in user details
All users require:
- Email — must be unique across the platform.
- Password — will be hashed before storage.
- Role — one of the five role values above.
- Tenant (required for
tenant_admin,event_manager,access_control) — the faculty this user belongs to.
tenant_admin, the following personal information fields are required (enforced by the API):- Name (
name) - Last Name (
lastName) - Document ID (
documentId) - Phone (
phone)
API — Create a User
201 Created:
The
POST /api/users endpoint validates that name, lastName, documentId, and phone are present when role is tenant_admin. Sending an incomplete body for that role returns 400 with the message: “Personal information (name, lastName, documentId, phone) is required for tenant administrators.”tenantId query parameter:
Creating Managers (Faculty Admin)
Faculty admins (tenant_admin) create event_manager and access_control accounts for their own tenant from /faculty-admin/managers/new. This calls the dedicated managers endpoint:
201 Created — returns the created user object.
The POST /api/users/managers endpoint:
- Reads the caller’s
tenantIddirectly from the session cookie — the manager is automatically assigned to the admin’s tenant. - Only allows
event_managerandaccess_controlas valid roles (any other value defaults toevent_manager). - Requires an active session with role
tenant_adminorsuperadminand a non-nulltenantId.
Editing Users
Update any mutable user field by sending aPUT request with the fields to change. If a new passwordHash value is included, it is re-hashed automatically.
200 OK — returns the full updated user object.