From 674878f65cab58c6e034213e028dce9a6e9e7684 Mon Sep 17 00:00:00 2001 From: qianming Date: Tue, 17 May 2022 19:58:09 +0800 Subject: [PATCH] update-admin authority --- .../db/migration/V1.0.19__add_admin_authority.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 report-core/src/main/resources/db/migration/V1.0.19__add_admin_authority.sql diff --git a/report-core/src/main/resources/db/migration/V1.0.19__add_admin_authority.sql b/report-core/src/main/resources/db/migration/V1.0.19__add_admin_authority.sql new file mode 100644 index 00000000..4b6b188d --- /dev/null +++ b/report-core/src/main/resources/db/migration/V1.0.19__add_admin_authority.sql @@ -0,0 +1,15 @@ +-- admin角色权限 +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","authorityManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="authorityManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","roleManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="roleManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","userManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="userManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","datasourceManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="datasourceManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","resultsetManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="resultsetManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","reportManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="reportManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","reportManage","query" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="reportManage" AND `action`="query"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","bigScreenManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="bigScreenManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","bigScreenManage","copy" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="bigScreenManage" AND `action`="copy"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","excelManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="excelManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","fileManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="fileManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","dictManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="dictManage" AND `action`="detail"); +INSERT INTO `aj_report`.`access_role_authority`(`role_code`,`target`,`action`) SELECT "root","dictItemManage","detail" FROM DUAL WHERE NOT EXISTS(SELECT `role_code`,`target`,`action` FROM `aj_report`.`access_role_authority` WHERE `role_code`="root" AND `target`="dictItemManage" AND `action`="detail"); +