refs #5660 rol fix and inherits rol
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
3bea23c52a
commit
b19c15bd68
|
@ -1 +0,0 @@
|
|||
ALTER TABLE account.`role` MODIFY COLUMN name varchar(79) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL COMMENT 'MySQL doesn''t support more than 14 chars for proxied user names';
|
|
@ -2,22 +2,20 @@
|
|||
INSERT INTO `account`.`role` (name,description)
|
||||
VALUES ('deliveryAssistant','Asistencia de envios');
|
||||
|
||||
INSERT INTO `account`.`roleInherit`
|
||||
INSERT INTO `account`.`roleInherit` (role,inheritsFrom)
|
||||
SELECT (SELECT id FROM account.role r WHERE r.name = 'deliveryAssistant'), ri.inheritsFrom
|
||||
FROM account.roleInherit ri
|
||||
JOIN account.role r ON r.id = ri.`role`
|
||||
WHERE r.name = 'deliveryBoss';
|
||||
|
||||
|
||||
DELETE FROM roleInherit WHERE role = 57;
|
||||
DELETE FROM `account`.`roleInherit` WHERE role = 57;
|
||||
|
||||
INSERT INTO `account`.`roleInherit`
|
||||
SELECT (SELECT id FROM account.role r WHERE r.name = 'deliveryBoss'), ri.inheritsFrom
|
||||
FROM account.roleInherit ri
|
||||
JOIN account.role r ON r.id = ri.`role`
|
||||
WHERE
|
||||
|
||||
INSERT INTO `account`.`roleInherit` (role, inheritsFrom)
|
||||
SELECT (SELECT id FROM account.role WHERE name = 'deliveryBoss') role,
|
||||
(SELECT id FROM account.role WHERE name = 'deliveryAssistant') roleInherit;
|
||||
|
||||
|
||||
CALL account.role_syncPrivileges();
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
INSERT INTO account.roleInherit(role,inheritsFrom)
|
||||
SELECT (SELECT id FROM account.role r WHERE r.name = 'deliveryAssistant') role, ri.inheritsFrom
|
||||
FROM account.roleInherit ri
|
||||
JOIN account.role r ON r.id = ri.`role`
|
||||
WHERE r.name = 'deliveryBoss';
|
Loading…
Reference in New Issue