Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Israel-Perez/Nuxt-Secure/llms.txt

Use this file to discover all available pages before exploring further.

Modules represent independently controllable sections or features of the application. Each module registered in Nuxt Secure becomes a row in the permissions matrix, allowing administrators to grant or deny the five permission actions to each profile.

Overview

The Catálogo de Módulos page lists all application modules. From here you can create new modules, edit their names, view their details, and delete them. Access requires the bitConsulta permission on the MÓDULO module. Without it, the application redirects you to / before the page renders.

Filtering modules

A single search filter is available: a case-insensitive partial match on strNombreModulo. The filter applies with a 400 ms debounce. Click Limpiar to reset.

Creating a module

Click Nuevo Módulo to open the creation form. This button requires both bitConsulta and bitAgregar on the MÓDULO module.
1

Enter a module name

Provide the name for the module in strNombreModulo (e.g., USUARIO, PERMISOS-PERFIL, INVENTARIO). This name is the key used in RBAC lookups throughout the application.
2

Save the module

Click Guardar Registro. The module is immediately available in the permissions matrix.
3

Assign permissions

After creating the module, navigate to the Permissions matrix and configure which profiles can access it and what actions they can perform.
Module names are compared using .toUpperCase() inside tienePermiso(), so tienePermiso('usuario', 'bitConsulta') and tienePermiso('USUARIO', 'bitConsulta') are equivalent. However, the canonical convention is to store and reference module names in uppercase (e.g., USUARIO, PERFIL, PERMISOS-PERFIL) to avoid confusion.

Editing a module

Click the edit icon on any row to rename the module. This requires bitEditar on the MÓDULO module.
Renaming a module changes the key used in tienePermiso() calls throughout the application. If any page or composable references the old module name, those permission checks will return false until the code is updated to match the new name.

Deleting a module

Click the delete icon on any row and confirm the dialog. This requires bitEliminar on the MÓDULO module.
Deleting a module also removes its associated permission rows from permisos_perfil for all profiles. This is confirmed in the deletion dialog: “También se borrarán sus permisos de la base de datos.” Users whose profiles had permissions on the deleted module will immediately lose access to the corresponding section.
The menu table links modules to navigation menu items. Each row in menu associates a menu entry (idMenu) with a module (idModulo). This allows the sidebar navigation to show or hide items based on whether the current user has bitConsulta on the linked module.
ColumnTypeDescription
idserial PKAuto-increment primary key
idMenuintegerMenu item identifier
idModulointeger FKReferences modulo.id

Permission gates

Actions on the modules page are gated by the MÓDULO module:
Permission flagControls
bitConsultaView the modules table and access the page
bitAgregarShow the Nuevo Módulo button
bitEditarShow the edit button per row
bitEliminarShow the delete button per row
bitDetalleShow the detail view button per row

Module data model

The modulo table is defined in server/database/schema.ts:
ColumnTypeRequiredDescription
idserial PKYesAuto-increment primary key
strNombreModulovarchar(255)YesModule name used as the RBAC key

Permissions matrix

Assign permissions to each profile for every module registered here.

Role-based access control

Understand how modules, profiles, and permission flags work together.