Planta Milenio’s access control system is built on five independent boolean flags stored directly on eachDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanDiego3030/Planta_Milenio/llms.txt
Use this file to discover all available pages before exploring further.
User_admin record. There are no roles, no groups, and no inherited privileges — every flag is evaluated individually at the top of each view function. A user can hold any combination of flags, enabling fine-grained access that fits the operational responsibilities of each operator.
Permission Flags Reference
| Field | URL | Module purpose |
|---|---|---|
permiso_control | /control/ | Register purchase order entries and view entry history |
permiso_control_personas | /control_personas/ | Log and track visitor and personnel access |
permiso_reportes | /reportes/ | View operational reports and download PDFs |
permiso_auditoria | /auditoria/ | View and edit transport records in orden_profit_transporte |
permiso_usuarios | /usuarios/ | Create, edit, and delete User_admin accounts |
False, the view never renders — it redirects to login with an error message.
Per-Permission Details
permiso_control — Control de Entradas (/control/)
permiso_control — Control de Entradas (/control/)
What it enables:
- Search purchase orders by order number (
fact_num) against the externalsqlserverandceres_romanadatabases - Register a purchase order entry into the local
Historialtable and theorden_profit_transportetable inceres_romanavia theOrden_Profit_Transporte_Insertstored procedure - Browse the paginated entry history with date-range filtering
- Download entry history as a PDF report
control view redirects to login immediately with: “No tiene permiso para acceder a la vista de control.”Additional solo_consulta restriction:
Even with this flag enabled, a solo_consulta user cannot submit the order registration form (POST). Any attempt is redirected with: “No tiene permisos para registrar ingresos. Solo puede consultar y descargar el historial.”permiso_control_personas — Control de Personas (/control_personas/)
permiso_control_personas — Control de Personas (/control_personas/)
What it enables:
- Log a new
AccesoPersonaentry: captures name, surname, ID number (cedula), company, entry reason, authorized by, vehicle plate, and visit status (aprobada/negada) - Record departure time for an approved visit, auto-calculating
tiempo_visitain minutes - Search the paginated visitor history by name, surname, ID number, or vehicle plate
control_personas view redirects to login immediately with: “No tiene permiso para acceder a la vista de control de personas.”Additional solo_consulta restriction:
A solo_consulta user can open the page and search the visitor history but cannot submit new entries or record departures. Any POST is blocked with: “No tiene permisos para registrar o modificar accesos de personas. Solo puede consultar.”permiso_reportes — Reportes (/reportes/)
permiso_reportes — Reportes (/reportes/)
What it enables:
- View the
materia_primareport: paginatedHistorialentries filterable by date range - View the
personalreport: paginatedAccesoPersonaentries filterable by date range - Download either report as a PDF (generated by WeasyPrint from a Django template)
reportes view redirects to login with: “No tiene permiso para acceder a la vista de reportes.”Additional solo_consulta restriction:
The reports views are read-only by nature (GET-only navigation and PDF downloads). A solo_consulta user with this permission experiences no functional difference from a full-access user on this module.permiso_auditoria — Auditoría (/auditoria/)
permiso_auditoria — Auditoría (/auditoria/)
What it enables:
- Browse the most recent 100 records from
orden_profit_transporteinceres_romana, with full-text search across order number, vehicle plate, and conductor fields - Edit transport record fields (product code, company RIF, conductor ID number, vehicle plates, destination) via the
Orden_Profit_Transporte_Updatestored procedure - Records with a non-zero
Pesada_Idare locked — the edit button is hidden and any attempt to edit them is rejected with: “No se puede editar este registro porque ya tiene Pesada_Id.”
auditoria view redirects to login with: “No tiene permiso para acceder a la auditoría.”Additional solo_consulta restriction:
A solo_consulta user can browse and search audit records but cannot submit the edit form. Any POST with editar_registro is blocked with: “No tiene permisos para editar registros.”permiso_usuarios — Gestión de Usuarios (/usuarios/)
permiso_usuarios — Gestión de Usuarios (/usuarios/)
What it enables:
- List all
User_adminrecords alphabetically, paginated at 10 per page - Create new users with full control over all fields and permission flags
- Edit any existing user’s fields, permissions, and lock status (password is only updated when a new value is explicitly entered)
- Delete users permanently
control_usuarios view redirects to login with: “No tiene permiso para acceder a la gestión de usuarios.”Additional solo_consulta restriction:
A solo_consulta user can view the user list but all Create, Edit, and Delete form submissions are blocked with: “No tiene permisos para crear, editar o eliminar usuarios. Solo puede consultar.”solo_consulta — Read-Only Mode
When solo_consulta is True, the user can log in normally and navigate to any view their permission flags allow. The restriction applies exclusively to HTTP POST requests: every write operation across all five modules is intercepted before any database call occurs and the user is redirected with an explanatory error message.
This mode is well-suited for:
- Auditors who need to inspect records and download PDFs but must not modify operational data
- Supervisors who review activity across all modules without making entries themselves
- Temporary or provisional accounts being reviewed before being granted full write access
solo_consulta in the web panel is done through the checkbox on the Create or Edit user form. Via the CLI, it is set during initial registration (the s/n prompt) or can be changed at any time using option 2 (change password) in CreateUser.py.
bloqueado — Account Locking
The bloqueado flag is a complete login block. The login view checks it before verifying the password:
permiso_usuarios) and save. There is no self-service unlock flow.
Configuring Permissions
- Web panel
- CLI (CreateUser.py)
Log in as a user with permiso_usuarios
Navigate to
/usuarios/. If you see the user list, your account has the necessary access.Open the Create or Edit form
Click Crear usuario for a new account, or the Edit icon next to an existing user.
Toggle the permission checkboxes
Each
permiso_* field is rendered as a checkbox. Check the modules the user should be able to access. Set Solo consulta if the user should have read-only access across their permitted modules. Set Bloqueado to disable login without deleting the record.