From 96163cb07fe14a7cbffcce45622796b515a4d107 Mon Sep 17 00:00:00 2001 From: vicent Date: Tue, 23 May 2023 10:43:46 +0200 Subject: [PATCH] refs #5468 feat: update acls --- db/changes/232201/00-aclMailAliasAccount.sql | 4 ++++ db/changes/232201/00-aclMailForward.sql | 4 ++++ db/changes/232201/00-aclRole.sql | 4 ++++ modules/account/front/mail-forwarding/index.js | 1 + 4 files changed, 13 insertions(+) create mode 100644 db/changes/232201/00-aclMailAliasAccount.sql create mode 100644 db/changes/232201/00-aclMailForward.sql create mode 100644 db/changes/232201/00-aclRole.sql diff --git a/db/changes/232201/00-aclMailAliasAccount.sql b/db/changes/232201/00-aclMailAliasAccount.sql new file mode 100644 index 000000000..c0f3a8829 --- /dev/null +++ b/db/changes/232201/00-aclMailAliasAccount.sql @@ -0,0 +1,4 @@ +DELETE FROM `salix`.`ACL` WHERE model = 'MailAliasAccount'; +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES + ('MailAliasAccount', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); diff --git a/db/changes/232201/00-aclMailForward.sql b/db/changes/232201/00-aclMailForward.sql new file mode 100644 index 000000000..0378a95f9 --- /dev/null +++ b/db/changes/232201/00-aclMailForward.sql @@ -0,0 +1,4 @@ +DELETE FROM `salix`.`ACL` WHERE model = 'MailForward'; +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES + ('MailForward', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); diff --git a/db/changes/232201/00-aclRole.sql b/db/changes/232201/00-aclRole.sql new file mode 100644 index 000000000..58f013c44 --- /dev/null +++ b/db/changes/232201/00-aclRole.sql @@ -0,0 +1,4 @@ +DELETE FROM `salix`.`ACL` WHERE model = 'Role'; +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES + ('Role', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); diff --git a/modules/account/front/mail-forwarding/index.js b/modules/account/front/mail-forwarding/index.js index b48fd2258..8b3fee489 100644 --- a/modules/account/front/mail-forwarding/index.js +++ b/modules/account/front/mail-forwarding/index.js @@ -12,6 +12,7 @@ export default class Controller extends Section { .then(res => { this.isSubordinate = res.data; if (!this.isSubordinate) throw new UserError(`You don't have enough privileges`); + this.$.watcher.submit(); }); }