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); };