From 7d59c6ec0cace310060c4e0e466dee02cd4b3a2d Mon Sep 17 00:00:00 2001 From: vicent Date: Tue, 30 May 2023 10:07:17 +0200 Subject: [PATCH] =?UTF-8?q?refs=20#5468=20feat:=20eliminado=20acl=20nativo?= =?UTF-8?q?=20y=20a=C3=B1adido=20a=20salix.ACL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/models/vn-user.js | 2 +- db/changes/232201/00-aclVnUser.sql | 3 ++- modules/account/back/models/account.js | 3 --- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/back/models/vn-user.js b/back/models/vn-user.js index 978227966..cd45c92e2 100644 --- a/back/models/vn-user.js +++ b/back/models/vn-user.js @@ -11,7 +11,7 @@ module.exports = function(Self) { require('../methods/vn-user/validate-token')(Self); require('../methods/vn-user/privileges')(Self); - Self.definition.settings.acls.find(acl => acl.property == 'create').principalId = 'itManagement'; + Self.definition.settings.acls = Self.definition.settings.acls.filter(acl => acl.property !== 'create'); // Validations diff --git a/db/changes/232201/00-aclVnUser.sql b/db/changes/232201/00-aclVnUser.sql index 1a63ed964..39fa2cb14 100644 --- a/db/changes/232201/00-aclVnUser.sql +++ b/db/changes/232201/00-aclVnUser.sql @@ -6,4 +6,5 @@ INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalTyp VALUES ('VnUser', '*', '*', 'ALLOW', 'ROLE', 'itManagement'), ('VnUser', '__get__preview', 'READ', 'ALLOW', 'ROLE', 'employee'), - ('VnUser', 'preview', '*', 'ALLOW', 'ROLE', 'employee'); + ('VnUser', 'preview', '*', 'ALLOW', 'ROLE', 'employee'), + ('VnUser', 'create', '*', 'ALLOW', 'ROLE', 'itManagement'); diff --git a/modules/account/back/models/account.js b/modules/account/back/models/account.js index e44d10547..5021a5d94 100644 --- a/modules/account/back/models/account.js +++ b/modules/account/back/models/account.js @@ -7,7 +7,4 @@ module.exports = Self => { require('../methods/account/logout')(Self); require('../methods/account/change-password')(Self); require('../methods/account/set-password')(Self); - require('../methods/account/change-mail-forwarding')(Self); - require('../methods/account/add-mail-alias')(Self); - require('../methods/account/delete-mail-alias')(Self); };