Repository navigation
Auditoría BAC en pedidos, asignaciones y notificaciones #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
088ba0b
Auditoría BAC en pedidos, asignaciones y notificaciones
Andoumeda 87349a1
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] 80c3190
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] b5fdeef
Merge branch 'dev' into OM-552
Andoumeda 5dc12b6
Resolve merge conflicts in 3 file(s)
coderabbitai[bot] adda519
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Reporte de Auditoría BAC | ||
|
|
||
| Fecha: 03-06-2026 | ||
| Alcance: API de pedidos, asignaciones y notificaciones | ||
|
|
||
| ## Antes | ||
| - Cualquier usuario autenticado podía leer los datos de asignación por pedido, entrega o ID de asignación, incluyendo información personal de los pedidos. | ||
| - Un SELLER podía crear una asignación de entrega para pedidos fuera de su tienda. | ||
| - Un DELIVERY podía actualizar el estado del pedido a DELIVERED sin demostrar que el pedido le había sido asignado. | ||
|
|
||
| ## Después | ||
| - Las lecturas de asignación ahora aplican la propiedad por rol (el SELLER es propietario de la tienda, el CUSTOMER es propietario del pedido y el DELIVERY es propietario de la asignación). | ||
| - La creación de asignaciones valida que el SELLER sea propietario de la tienda del pedido y que la entrega pertenezca a la misma tienda. | ||
| - Las actualizaciones de estado del DELIVERY requieren una asignación aceptada vinculada al usuario de entrega autenticado. | ||
|
|
||
| ## Archivos modificados | ||
| - src/modules/delivery/delivery-assignments/delivery-assignments.service.js | ||
| - src/modules/delivery/delivery-assignments/delivery-assignments.controller.js | ||
| - src/modules/users/orders/order.service.js | ||
| - tests/unit/delivery/delivery-assignments.test.js | ||
| - tests/unit/order/order.test.js | ||
| - tests/unit/delivery/delivery-assignments-controller.test.js | ||
| - tests/unit/commerce/delivery-assignments.test.js | ||
| - tests/e2e/delivery-assignments-create.test.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.