refs #6085 aclMail back #1869

Merged
carlossa merged 16 commits from 6085-ACLsMail into dev 2024-01-03 07:56:11 +00:00
Member
No description provided.
carlossa added 1 commit 2023-11-29 06:37:56 +00:00
gitea/salix/pipeline/head This commit looks good Details
0186c2c806
refs #6085 aclMail back
carlossa added 1 commit 2023-11-29 06:51:50 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
e548ef4dae
refs #6085 searchpanel and change path
alexm reviewed 2023-11-29 07:57:03 +00:00
@ -0,0 +1,7 @@
-- Definición de la tabla mailAliasACL
CREATE TABLE `account`.`mailAliasACL` (
Member

CREATE OR REPLACE

CREATE OR REPLACE
carlossa marked this conversation as resolved
carlossa added 1 commit 2023-11-29 12:55:36 +00:00
gitea/salix/pipeline/head This commit looks good Details
9a3efdd6fe
refs #6085 model y back
alexm requested changes 2023-11-30 11:52:30 +00:00
alexm left a comment
Member

Revisa el back y carregat el front tot lo demes guay

Revisa el back y carregat el front tot lo demes guay
@ -0,0 +1,70 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
require('../methods/notification/getList')(Self);
Member

mmmm

mmmm
carlossa marked this conversation as resolved
@ -0,0 +11,4 @@
await checkModifyPermission(ctx);
});
async function checkModifyPermission(ctx) {
Member

Esta part mirala be pq soles has de comprovar el userId del que esta fent el canvi const userId = ctx.options.accessToken.userId;

Esta part mirala be pq soles has de comprovar el userId del que esta fent el canvi const userId = ctx.options.accessToken.userId;
Author
Member

No se usa ese fichero, se usa account, solucionado

No se usa ese fichero, se usa account, solucionado
carlossa marked this conversation as resolved
@ -0,0 +1,33 @@
import ngModule from '../../../module';
Member

El front carregatelo

El front carregatelo
carlossa marked this conversation as resolved
carlossa added 1 commit 2023-12-01 12:58:37 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
6d486fbec9
refs #6085 trad, remove front, back test
carlossa added 1 commit 2023-12-04 08:40:48 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
c0ce7e542f
refs #6085 solve testback
carlossa added 1 commit 2023-12-04 08:41:15 +00:00
gitea/salix/pipeline/head This commit looks good Details
051c93a42c
remove fdescribe
carlossa changed title from WIP: refs #6085 aclMail back to refs #6085 aclMail back 2023-12-04 08:47:22 +00:00
carlossa requested review from jgallego 2023-12-04 08:49:00 +00:00
jgallego refused to review 2023-12-04 09:00:34 +00:00
jgallego requested review from juan 2023-12-04 09:00:44 +00:00
carlossa added 1 commit 2023-12-04 09:01:48 +00:00
gitea/salix/pipeline/head This commit looks good Details
62b2e23620
Merge branch 'dev' into 6085-ACLsMail
alexm requested changes 2023-12-11 07:10:25 +00:00
@ -0,0 +1,8 @@
-- Definición de la tabla mailAliasACL
Member

Cambiar a nueva versión

Cambiar a nueva versión
carlossa marked this conversation as resolved
@ -68,3 +68,4 @@ Load more results: Cargar más resultados
Send cau: Enviar cau
By sending this ticket, all the data related to the error, the section, the user, etc., are already sent.: Al enviar este cau ya se envían todos los datos relacionados con el error, la sección, el usuario, etc
ExplainReason: Explique el motivo por el que no deberia aparecer este fallo
You already have the mailAlias: Ya tienes este mail
Member

este alias de correo

este alias de correo
carlossa marked this conversation as resolved
@ -331,2 +331,3 @@
"Cannot past travels with entries": "No se pueden pasar envíos con entradas",
"It was not able to remove the next expeditions:": "No se pudo eliminar las siguientes expediciones: {{expeditions}}"
"It was not able to remove the next expeditions:": "No se pudo eliminar las siguientes expediciones: {{expeditions}}",
"You already have the mailAlias": "You already have the mailAlias",
Member

Habria que traducirlo aqui

Habria que traducirlo aqui
carlossa marked this conversation as resolved
@ -44,1 +47,4 @@
roleFk: {
inq: roles.map(role => role.roleId),
},
}
Member

Estic dubtant de si igual valdria la pena possar tb mailAliasFk: mailAliasFk
Aixina despres no cal buscarlo concretament.

Este enfoque se pareix al de notificactions (que es com te vaig dir) pero igual en este cas com no es crida des de altre lloc per a demanar el llistat igual no val la pena fer-ho igual

Estic dubtant de si igual valdria la pena possar tb mailAliasFk: mailAliasFk Aixina despres no cal buscarlo concretament. Este enfoque se pareix al de notificactions (que es com te vaig dir) pero igual en este cas com no es crida des de altre lloc per a demanar el llistat igual no val la pena fer-ho igual
carlossa marked this conversation as resolved
@ -0,0 +1,55 @@
const UserError = require('vn-loopback/util/user-error');
Member

Pq el codi esta duplicat en modules/account/back/models/mail-alias-acl.js i modules/account/back/models/mail-alias-account.js ?

Pq el codi esta duplicat en modules/account/back/models/mail-alias-acl.js i modules/account/back/models/mail-alias-account.js ?
carlossa marked this conversation as resolved
carlossa added 3 commits 2023-12-11 07:54:48 +00:00
carlossa requested review from alexm 2023-12-11 08:07:41 +00:00
juan requested changes 2023-12-11 08:36:33 +00:00
@ -33,3 +29,1 @@
const user = await models.VnUser.findById(userId, {fields: ['hasGrant']});
if (!user.hasGrant)
throw new UserError(`You don't have grant privilege`);
if (typeof options == 'object')
Owner

options no esta definida en ningún sitio

options no esta definida en ningún sitio
carlossa marked this conversation as resolved
@ -52,3 +48,1 @@
return true;
};
console.log(availableMailAlias);
Owner

Se ha quedado un console log

Se ha quedado un console log
carlossa marked this conversation as resolved
carlossa added 1 commit 2023-12-11 08:43:29 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
57ed36cdfc
ref #6085 remove console options
carlossa added 1 commit 2023-12-11 08:58:59 +00:00
gitea/salix/pipeline/head This commit looks good Details
6ac5d28c40
refs #6085 fix back
carlossa requested review from juan 2023-12-11 08:59:18 +00:00
juan requested changes 2023-12-11 09:08:23 +00:00
@ -29,3 +26,2 @@
const canEditAlias = await models.ACL.checkAccessAcl(accessToken, 'MailAliasAccount', 'canEditAlias', 'WRITE');
if (canEditAlias) return true;
const myOptions = {};
Owner

myOptions no tiene utilidad

myOptions no tiene utilidad
carlossa marked this conversation as resolved
carlossa added 1 commit 2023-12-11 09:16:34 +00:00
gitea/salix/pipeline/head This commit looks good Details
53ff8784ff
refs #6085 remove myOptions
carlossa requested review from juan 2023-12-11 09:24:12 +00:00
juan requested changes 2023-12-11 10:07:04 +00:00
@ -41,3 +32,1 @@
scope: {
fields: ['mailAlias']
}
const availableMailAlias = await models.MailAliasAcl.find({
Owner

Un findOne sería mes adequat. I faría la inversa, primer traure els registres de MailAliasAcl i despres comprobar si el usuari te algún dells en findOne

Un `findOne` sería mes adequat. I faría la inversa, primer traure els registres de MailAliasAcl i despres comprobar si el usuari te algún dells en findOne
carlossa marked this conversation as resolved
carlossa added 1 commit 2023-12-11 11:45:46 +00:00
gitea/salix/pipeline/head This commit looks good Details
2beb1f65f0
refs #6085 findOne
juan approved these changes 2023-12-11 13:49:05 +00:00
Dismissed
carlossa added 1 commit 2023-12-11 13:50:12 +00:00
gitea/salix/pipeline/head This commit looks good Details
2def2d9ebd
Merge branch 'dev' into 6085-ACLsMail
alexm approved these changes 2024-01-02 07:41:58 +00:00
Dismissed
carlossa added 1 commit 2024-01-03 07:31:06 +00:00
carlossa dismissed juan’s review 2024-01-03 07:31:07 +00:00
Reason:

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

carlossa dismissed alexm’s review 2024-01-03 07:31:07 +00:00
Reason:

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

alexm approved these changes 2024-01-03 07:32:31 +00:00
carlossa merged commit b70e2fc1a4 into dev 2024-01-03 07:56:11 +00:00
carlossa deleted branch 6085-ACLsMail 2024-01-03 07:56:11 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 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#1869
No description provided.