refs #5468 feat: update acls
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Vicent Llopis 2023-05-23 10:43:46 +02:00
parent cd244daf84
commit 96163cb07f
4 changed files with 13 additions and 0 deletions

View File

@ -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');

View File

@ -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');

View File

@ -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');

View File

@ -12,6 +12,7 @@ export default class Controller extends Section {
.then(res => { .then(res => {
this.isSubordinate = res.data; this.isSubordinate = res.data;
if (!this.isSubordinate) throw new UserError(`You don't have enough privileges`); if (!this.isSubordinate) throw new UserError(`You don't have enough privileges`);
this.$.watcher.submit(); this.$.watcher.submit();
}); });
} }