Overview
Quality Hub GINEZ uses a Role-Based Access Control (RBAC) system with granular permissions for each module. As an administrator, you can assign roles and configure specific permissions to control what users can view, create, edit, delete, and export.Permission System Architecture
The system uses two levels of access control:- Role-Based Permissions: Predefined permission sets for common job functions
- Module-Level Permissions: Granular control over specific actions in each module
Permission Types
Each module can have the following permission types:| Permission | Description | Example |
|---|---|---|
| View | Read-only access to module data | View product catalog |
| Create | Add new records | Register new batch in bitácora |
| Edit | Modify existing records | Update quality measurements |
| Delete | Remove records | Delete incorrect entries |
| Export | Download data to files | Export reports to Excel/PDF |
System Modules
Quality Hub GINEZ has the following modules with configurable permissions:- Panel Principal (Dashboard) - Overview and KPIs
- Catálogo - Product catalog and technical documentation
- Bitácora - Production batch logging
- Control de Calidad - Quality control and NCR
- Laboratorio I+D - Research and development lab
- Reportes - Reports and analytics
- Configuración - System configuration and user management
Assigning Permissions
Method 1: Using Predefined Roles (Recommended)
The fastest way to grant permissions is by assigning a predefined role that matches the user’s job function.Select Role
Choose from the dropdown:
- Administrador
- Preparador
- Gerente de Sucursal
- Director de Operaciones
- Gerente de Calidad
- Mostrador
- Cajera
- Director de Compras
Method 2: Manual Permission Configuration (Advanced)
For custom permission needs, you can configure each module’s permissions individually.Configure Each Module
For each module (Catálogo, Bitácora, etc.), toggle the switches:
- ✅ Ver (View)
- ✅ Crear (Create)
- ✅ Editar (Edit)
- ✅ Eliminar (Delete)
- ✅ Exportar (Export)
Review Access Level
The system automatically calculates access level:
- Acceso Completo (Full Access) - All permissions enabled
- Acceso Parcial (Partial Access) - Some permissions enabled
- Acceso Restringido (Restricted Access) - View only or no access
Permission Matrix by Role
Administrador - Full Access
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ✅ | ✅ | ✅ | ✅ |
| Catálogo | ✅ | ✅ | ✅ | ✅ | ✅ |
| Control Calidad | ✅ | ✅ | ✅ | ✅ | ✅ |
| Bitácora | ✅ | ✅ | ✅ | ✅ | ✅ |
| Laboratorio I+D | ✅ | ✅ | ✅ | ✅ | ✅ |
| Reportes | ✅ | ✅ | ✅ | ✅ | ✅ |
| Configuración | ✅ | ✅ | ✅ | ✅ | ✅ |
Gerente de Calidad - Quality Oversight
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ❌ | ❌ | ❌ | ✅ |
| Catálogo | ✅ | ❌ | ❌ | ❌ | ✅ |
| Control Calidad | ✅ | ✅ | ✅ | ❌ | ✅ |
| Bitácora | ✅ | ❌ | ❌ | ❌ | ✅ |
| Laboratorio I+D | ✅ | ❌ | ❌ | ❌ | ✅ |
| Reportes | ✅ | ✅ | ✅ | ❌ | ✅ |
| Configuración | ✅ | ❌ | ❌ | ❌ | ❌ |
Gerente de Sucursal - Branch Operations
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ❌ | ❌ | ❌ | ❌ |
| Catálogo | ✅ | ❌ | ❌ | ❌ | ❌ |
| Control Calidad | ✅ | ✅ | ❌ | ❌ | ❌ |
| Bitácora | ✅ | ✅ | ✅ | ❌ | ❌ |
| Laboratorio I+D | ❌ | ❌ | ❌ | ❌ | ❌ |
| Reportes | ✅ | ❌ | ❌ | ❌ | ❌ |
| Configuración | ❌ | ❌ | ❌ | ❌ | ❌ |
Preparador - Batch Preparation
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ❌ | ❌ | ❌ | ❌ |
| Catálogo | ✅ | ❌ | ❌ | ❌ | ❌ |
| Control Calidad | ❌ | ❌ | ❌ | ❌ | ❌ |
| Bitácora | ✅ | ✅ | ✅ | ❌ | ❌ |
| Laboratorio I+D | ❌ | ❌ | ❌ | ❌ | ❌ |
| Reportes | ❌ | ❌ | ❌ | ❌ | ❌ |
| Configuración | ❌ | ❌ | ❌ | ❌ | ❌ |
Director de Operaciones - Operations Director
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ✅ | ✅ | ❌ | ✅ |
| Catálogo | ✅ | ✅ | ✅ | ❌ | ✅ |
| Control Calidad | ✅ | ✅ | ✅ | ❌ | ✅ |
| Bitácora | ✅ | ✅ | ✅ | ❌ | ✅ |
| Laboratorio I+D | ✅ | ✅ | ✅ | ❌ | ✅ |
| Reportes | ✅ | ✅ | ✅ | ❌ | ✅ |
| Configuración | ✅ | ❌ | ❌ | ❌ | ❌ |
Cajera - Cashier
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ❌ | ❌ | ❌ | ❌ |
| Catálogo | ✅ | ❌ | ❌ | ❌ | ❌ |
| Control Calidad | ❌ | ❌ | ❌ | ❌ | ❌ |
| Bitácora | ❌ | ❌ | ❌ | ❌ | ❌ |
| Laboratorio I+D | ❌ | ❌ | ❌ | ❌ | ❌ |
| Reportes | ✅ | ❌ | ❌ | ❌ | ❌ |
| Configuración | ❌ | ❌ | ❌ | ❌ | ❌ |
Director de Compras - Purchasing Director
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ❌ | ❌ | ❌ | ✅ |
| Catálogo | ✅ | ✅ | ✅ | ❌ | ✅ |
| Control Calidad | ✅ | ❌ | ❌ | ❌ | ✅ |
| Bitácora | ✅ | ❌ | ❌ | ❌ | ✅ |
| Laboratorio I+D | ✅ | ❌ | ❌ | ❌ | ✅ |
| Reportes | ✅ | ❌ | ❌ | ❌ | ✅ |
| Configuración | ❌ | ❌ | ❌ | ❌ | ❌ |
Mostrador - Counter Staff
| Module | Ver | Crear | Editar | Eliminar | Exportar |
|---|---|---|---|---|---|
| Panel Principal | ✅ | ❌ | ❌ | ❌ | ❌ |
| Catálogo | ✅ | ❌ | ❌ | ❌ | ❌ |
| Control Calidad | ❌ | ❌ | ❌ | ❌ | ❌ |
| Bitácora | ❌ | ❌ | ❌ | ❌ | ❌ |
| Laboratorio I+D | ❌ | ❌ | ❌ | ❌ | ❌ |
| Reportes | ✅ | ❌ | ❌ | ❌ | ❌ |
| Configuración | ❌ | ❌ | ❌ | ❌ | ❌ |
Row Level Security (RLS)
In addition to module permissions, Quality Hub GINEZ implements Row Level Security to control data access:User-Level RLS
Normal users can only:- View their own bitácora records
- Edit their own bitácora records
- View their own quality control entries
Admin-Level Override
Administrators can:- View all records from all users
- Edit any record regardless of creator
- Delete any record (with audit trail)
RLS policies are enforced at the database level in Supabase, providing an additional security layer beyond application permissions.
Real-World Workflow Example
Scenario: Batch Preparation and Quality Validation
Preparador - Juan
Permissions: Preparador role
- ✅ Views catalog to see product formula
- ✅ Prepares batch following specifications
- ✅ Registers batch in bitácora with basic data
- ❌ Cannot perform quality control (separate role)
Gerente de Sucursal - María
Permissions: Gerente de Sucursal role
- ✅ Sees batch registered by Juan in bitácora
- ✅ Takes samples and performs quality measurements
- ✅ Records pH, solids, and other parameters
- ✅ Marks batch as conforming/non-conforming
Gerente de Calidad - Carlos
Permissions: Gerente de Calidad role
- ✅ Reviews all records in Reports
- ✅ Analyzes trends and control charts
- ✅ Exports data for external analysis
- ✅ Can edit quality parameters if needed
Advanced: SQL-Based Permission Assignment
For advanced users with Supabase database access:Important Notes
⚠️ Permission changes are immediate - Users see changes instantly ⚠️ Users must reload the page - After permission changes, users should press F5 to refresh ⚠️ Only Administrators can manage permissions - Regular users cannot view or change permissions ⚠️ All changes are audited - Every permission change is logged for securityBest Practices
Security Guidelines
- Minimum Necessary Access: Grant only permissions required for job duties
- Regular Audits: Review permissions quarterly
- Separation of Duties: Preparers shouldn’t validate their own work
- Document Changes: Keep records of why permissions were granted
- Revoke Promptly: Remove access when employees leave or change roles
Common Permission Patterns
Production Floor Staff:- Role: Preparador or Gerente de Sucursal
- Focus: Bitácora and Quality Control
- No export or delete capabilities
- Role: Gerente de Calidad
- Focus: Reports and Quality Control
- Can export but not delete
- Role: Mostrador or Cajera
- Focus: Dashboard and Reports
- Read-only access for customer service
Troubleshooting
User Can’t See a Module They Should Access
- Check that “View” permission is enabled for that module
- Verify their role assignment is correct
- Ask user to clear cache and reload (Ctrl+Shift+R)
- Check for JavaScript errors in browser console
Permission Changes Not Taking Effect
- Confirm changes were saved (look for success message)
- User must reload the page completely
- Check for database connectivity issues
- Verify RLS policies aren’t blocking access
Accidentally Locked Out Admin
If you accidentally remove admin permissions:- Access Supabase dashboard directly
- Run SQL to restore admin flag:
- Reload the application
