/seguridad/permisos) gives administrators a visual grid to control exactly what each profile can do in every module. Each cell in the matrix is a checkbox representing one permission action.
Overview
The matrix page lists every registered module as a row and exposes five permission flags per module. You select a profile from the dropdown, review or adjust the checkboxes, and save the entire configuration in a single operation. Access requires thebitConsulta permission on the PERMISOS-PERFIL module. Without it, the application redirects you to / before the page renders.
The five permission flags
Each module row exposes the following toggleable flags:| Flag | UI label | Description |
|---|---|---|
bitConsulta | Consultar | View and list records in the module |
bitAgregar | Agregar | Create new records |
bitEditar | Editar | Edit existing records |
bitDetalle | Detalle | Open the detail view of a record |
bitEliminar | Eliminar | Delete records |
false. A flag must be explicitly enabled for the corresponding action to be permitted.
Using the matrix
Select a profile
Use the Perfil del Sistema dropdown at the top of the page to choose the profile you want to configure. The dropdown lists all profiles registered in the system.
Review the current permissions
Once a profile is selected, the matrix loads the profile’s current permission set. Each row represents a module; each column represents one of the five actions. Checked boxes indicate granted permissions.
Toggle checkboxes
Click any checkbox to grant or revoke the corresponding permission for that module and action. You can modify as many rows and flags as needed before saving.Checkboxes are disabled (read-only) if you do not have
bitEditar on the PERMISOS-PERFIL module.Click Guardar Permisos
Click the Guardar Permisos button to submit your changes. This button only appears if you have
bitEditar on the PERMISOS-PERFIL module.How saving works
Saving callsPOST /api/permisos/guardar-matriz with the entire matrix for the selected profile as a single payload:
cargarMisPermisos is called immediately after saving so the session reflects the new permissions without requiring a logout.
Permission gates
Actions on the permissions page are gated by thePERMISOS-PERFIL module:
| Permission flag | Controls |
|---|---|
bitConsulta | View the matrix and access the page |
bitEditar | Enable checkboxes and show the Guardar Permisos button |
Permissions data model
Thepermisos_perfil table stores one row per profile-module combination:
| Column | Type | Required | Description |
|---|---|---|---|
id | serial PK | Yes | Auto-increment primary key |
idModulo | integer FK | Yes | References modulo.id |
idPerfil | integer FK | Yes | References perfil.id |
bitConsulta | boolean | Yes | View permission (default false) |
bitAgregar | boolean | Yes | Create permission (default false) |
bitEditar | boolean | Yes | Edit permission (default false) |
bitEliminar | boolean | Yes | Delete permission (default false) |
bitDetalle | boolean | Yes | Detail view permission (default false) |
Permission changes take effect the next time the affected user’s session loads their permissions. This happens automatically at login via
cargarMisPermisos. If you need the changes to apply to a currently active session, the user must log out and back in — unless the edited profile belongs to you, in which case the session is refreshed immediately after saving.Related pages
Role-based access control
Understand how the permission flags are evaluated at runtime.
Module management
Register the modules that appear as rows in the matrix.