#5666 - Loggable to mixin #1826

Merged
alexm merged 29 commits from 5666-loggable_to_mixin into dev 2024-01-04 09:21:57 +00:00
Member
https://redmine.verdnatura.es/issues/5666
jsegarra added 3 commits 2023-11-10 14:22:11 +00:00
jsegarra added 2 commits 2023-11-13 08:54:21 +00:00
jsegarra added 1 commit 2023-11-13 08:56:19 +00:00
gitea/salix/pipeline/head This commit looks good Details
384b5eb7c7
refs #5666 remove old file
jgallego changed title from WIP: Loggable to mixin to Loggable to mixin 2023-11-17 12:55:36 +00:00
jgallego requested review from juan 2023-11-17 12:55:43 +00:00
jsegarra changed title from Loggable to mixin to #5666 - Loggable to mixin 2023-11-24 11:47:31 +00:00
juan approved these changes 2023-11-27 12:14:44 +00:00
Dismissed
@ -0,0 +10,4 @@
"mixins": {
"Loggable": true
}
}
Owner

A parte de crear el modelo habria que substituir todas las ocurrencias del modelo Role por VnRole

A parte de crear el modelo habria que substituir todas las ocurrencias del modelo Role por VnRole
jsegarra marked this conversation as resolved
@ -6,0 +5,4 @@
"mixins": {
"Loggable": true
}
}
Owner

Porque se continua manteniendo el json y el js del modelo Loggable? Habría que hacer que todos los modelos que lo tienen como base utilizaran el nuevo mixin

Porque se continua manteniendo el json y el js del modelo Loggable? Habría que hacer que todos los modelos que lo tienen como base utilizaran el nuevo mixin
Author
Member

Tenia entendido que si defines un mixin en un modelo, y este lo usas de base en otro modelo, este último lo hereda al igual que las propiedades.
Lo cambio

Tenia entendido que si defines un mixin en un modelo, y este lo usas de base en otro modelo, este último lo hereda al igual que las propiedades. Lo cambio
Owner

Este fichero habría que borrarlo.

Este fichero habría que borrarlo.
Author
Member

He eliminado el fichero json y el mixin se ha definido para cada uno de los modelos que dependía

He eliminado el fichero json y el mixin se ha definido para cada uno de los modelos que dependía
jsegarra marked this conversation as resolved
juan requested changes 2023-11-27 12:15:22 +00:00
juan left a comment
Owner

La he aprobado sin querer, revisar notas.

La he aprobado sin querer, revisar notas.
jsegarra added 3 commits 2023-11-28 07:18:38 +00:00
jsegarra dismissed juan’s review 2023-11-28 07:18:38 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jsegarra added 3 commits 2023-11-30 11:20:18 +00:00
jsegarra requested review from juan 2023-11-30 11:42:02 +00:00
juan requested changes 2023-12-04 13:49:39 +00:00
juan left a comment
Owner

A parte de las modificaciones solicitadas, quitar el modelo Role nativo del fichero loopback/server/model-config.json.

A parte de las modificaciones solicitadas, quitar el modelo `Role` nativo del fichero _loopback/server/model-config.json_.
@ -0,0 +1,8 @@
-- Auto-generated SQL script #202311301038
INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
VALUES ('VnRole','*','*','ALLOW','ROLE','$everyone');
Owner

Este ACL permite a cualquiera modificar los roles!

Aplicar los mismos ACLs que al modelo Role en producción.

**Este ACL permite a cualquiera modificar los roles!** Aplicar los mismos ACLs que al modelo `Role` en producción.
jsegarra marked this conversation as resolved
@ -0,0 +2,4 @@
INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
VALUES ('VnRole','*','*','ALLOW','ROLE','$everyone');
INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId)
VALUES ('VnRole','*','*','ALLOW','ROLE','employee');
Owner

Este ACL permite a los empleados modificar los roles!

Debe ser solo READ

**Este ACL permite a los empleados modificar los roles!** Debe ser solo READ
jsegarra marked this conversation as resolved
@ -0,0 +5,4 @@
VALUES ('VnRole','*','*','ALLOW','ROLE','employee');
-- Auto-generated SQL script #202311301203
UPDATE `salix`.`ACL` SET permission='DENY' WHERE model='Role';
Owner

DELETE FROM salix.ACL WHERE model='Role';

`DELETE FROM salix.ACL WHERE model='Role';`
jsegarra marked this conversation as resolved
jsegarra added 5 commits 2023-12-05 06:49:22 +00:00
jsegarra added 1 commit 2023-12-05 06:51:02 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
7a63e527a5
refs #5666 perf: remove comments
jsegarra added 1 commit 2023-12-05 11:00:40 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
035b31d878
refs #5666 test: fix e2e tests
jsegarra added 1 commit 2023-12-05 12:02:49 +00:00
jsegarra requested review from juan 2023-12-05 12:09:45 +00:00
jsegarra reviewed 2023-12-05 12:13:18 +00:00
@ -24,3 +24,3 @@
let modelName = rule.shift();
let fieldName = rule.shift();
let modelAlias = $attrs.ruleAlias;
Author
Member

He añadido este attrs para que desde las rutas de role/:id/basic-data y create se puedan cargar los datos entrantes del registro

He añadido este attrs para que desde las rutas de role/:id/basic-data y create se puedan cargar los datos entrantes del registro
Owner

No es necesario modificar rule, hay que usar rule="VnRule.[propiedad]" para que aplique las reglas de validación del modelo VnRole

No es necesario modificar rule, hay que usar `rule="VnRule.[propiedad]"` para que aplique las reglas de validación del modelo `VnRole`
jsegarra marked this conversation as resolved
juan requested changes 2023-12-11 08:44:42 +00:00
@ -21,2 +21,2 @@
label="Description"
ng-model="$ctrl.role.description"
label="Description"
ng-model="$ctrl.VnRole.description"
Owner

En lugar de modificar la directiva rule, hay que utilizar rule="VnRole.[propiedad]" para que aplique las reglas del modelo VnRole

En lugar de modificar la directiva rule, hay que utilizar `rule="VnRole.[propiedad]"` para que aplique las reglas del modelo VnRole
jsegarra marked this conversation as resolved
jsegarra added 1 commit 2023-12-11 11:40:34 +00:00
gitea/salix/pipeline/head This commit looks good Details
d1f0557923
refs #5666 perf: remove ruleAlias property
jsegarra requested review from juan 2023-12-11 11:41:07 +00:00
jsegarra added 1 commit 2023-12-11 11:59:18 +00:00
gitea/salix/pipeline/head This commit looks good Details
f817551a57
refs #5666 perf: remove ruleAlias property
jsegarra added 1 commit 2023-12-13 06:30:18 +00:00
gitea/salix/pipeline/head This commit looks good Details
074bb2b980
Merge branch 'dev' into 5666-loggable_to_mixin
jsegarra added 1 commit 2023-12-21 12:07:22 +00:00
juan approved these changes 2023-12-22 09:12:53 +00:00
Dismissed
jsegarra added 1 commit 2023-12-22 09:36:11 +00:00
gitea/salix/pipeline/head This commit looks good Details
8d08adca21
Merge branch 'dev' into 5666-loggable_to_mixin
jsegarra dismissed juan’s review 2023-12-22 09:36:12 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jsegarra added 1 commit 2023-12-22 09:38:02 +00:00
gitea/salix/pipeline/head This commit looks good Details
4d2cf87f49
Merge branch 'dev' into 5666-loggable_to_mixin
jsegarra added 1 commit 2024-01-02 09:26:24 +00:00
gitea/salix/pipeline/head This commit looks good Details
4510f0a037
Merge branch 'dev' into 5666-loggable_to_mixin
juan approved these changes 2024-01-03 11:44:25 +00:00
Dismissed
jsegarra added 1 commit 2024-01-03 12:46:33 +00:00
gitea/salix/pipeline/head This commit looks good Details
4d7f0329ee
Merge branch 'dev' into 5666-loggable_to_mixin
jsegarra dismissed juan’s review 2024-01-03 12:46:35 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jsegarra added 1 commit 2024-01-04 08:08:52 +00:00
gitea/salix/pipeline/head This commit looks good Details
f7d83b15bd
Merge branch 'dev' into 5666-loggable_to_mixin
alexm approved these changes 2024-01-04 09:21:27 +00:00
alexm merged commit 8019180ee8 into dev 2024-01-04 09:21:57 +00:00
alexm deleted branch 5666-loggable_to_mixin 2024-01-04 09:21:57 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#1826
No description provided.