刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 1 | -- 10.0.init.sql |
| 2 | |
刘洪青 | c04a9b5 | 2021-01-18 22:12:09 +0800 | [diff] [blame] | 3 | /* |
| 4 | 将 paas.example.com 替换为 paas.学校域名.edu.cn |
| 5 | */ |
| 6 | |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 7 | |
| 8 | use cas_server; |
| 9 | |
刘洪青 | dbd1566 | 2021-09-20 21:20:31 +0800 | [diff] [blame^] | 10 | -- 更新 服务 personal-security-center 的信息(废弃) |
刘洪青 | c9ac631 | 2020-11-05 15:50:20 +0800 | [diff] [blame] | 11 | update TB_SERVICE |
| 12 | set |
刘洪青 | dbd1566 | 2021-09-20 21:20:31 +0800 | [diff] [blame^] | 13 | DELETED=1, |
刘洪青 | c9ac631 | 2020-11-05 15:50:20 +0800 | [diff] [blame] | 14 | INFORMATION_URL='http://personal-security-center.paas.example.com', |
刘洪青 | c04a9b5 | 2021-01-18 22:12:09 +0800 | [diff] [blame] | 15 | LOGOUT_URL='http://personal-security-center.paas.example.com/slo?redirect_uri=http://security-center.paas.example.com/?clearCertification=clearCertification', |
刘洪青 | c9ac631 | 2020-11-05 15:50:20 +0800 | [diff] [blame] | 16 | SERVICE_ID='http://personal-security-center.paas.example.com/cas/(.*)' |
| 17 | where ID='2'; -- todo, modify |
| 18 | |
| 19 | |
| 20 | -- security-center-ui 认证对接信息 |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 21 | |
| 22 | INSERT INTO `TB_SERVICE` (`ID`, `COMPANY_ID`, `DELETED`, `ADD_ACCOUNT`, `ADD_TIME`, |
| 23 | `NAME`, `DESCRIPTION`, `INFORMATION_URL`, `LOGOUT_URL`, |
| 24 | `RESPONSE_TYPE`, `LOGOUT_TYPE`, |
| 25 | `EVALUATION_ORDER`, `FRIENDLY_NAME`, `REGISTERED_SERVICE_ID`, `SERVICE_ID`, |
| 26 | `ENABLED`, `SSO_ENABLED`, `REQUIRE_ALL_ATTRIBUTES`, |
| 27 | `APPLICATION_ID`, `EXTERNAL_ID`) |
| 28 | VALUES ('22', '1', 0, 'admin', '2020-07-01 00:00:00', |
刘洪青 | 7ab4091 | 2021-05-12 18:22:48 +0800 | [diff] [blame] | 29 | '安全中心', '安全中心', 'https://security-center.paas.example.com', 'https://security-center.paas.example.com/?clearCertification=clearCertification', |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 30 | 'REDIRECT', 'FRONT_CHANNEL', |
| 31 | 22, '安全中心', 22, 'https://security-center.paas.example.com/(.*)', |
| 32 | 1, 1, 1, |
| 33 | '22', '22'); |
| 34 | |
| 35 | commit; |
| 36 | |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 37 | -- 修改根域名 |
| 38 | update TB_SERVICE |
| 39 | set |
| 40 | INFORMATION_URL='http://security-center.paas.example.com', |
刘洪青 | 7ab4091 | 2021-05-12 18:22:48 +0800 | [diff] [blame] | 41 | LOGOUT_URL='http://security-center.paas.example.com/?clearCertification=clearCertification', |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 42 | SERVICE_ID='http://security-center.paas.example.com/(.*)', |
| 43 | ID_TOKEN_ENABLED=1, |
| 44 | JWT_AS_SERVICE_TICKET=1, |
| 45 | APPLICATION_DOMAIN='security-center.paas.example.com' |
| 46 | where ID='22'; -- todo, modify |
| 47 | |
| 48 | commit; |
| 49 | |
| 50 | |
刘洪青 | 906980d | 2020-09-20 16:26:15 +0800 | [diff] [blame] | 51 | -- 请注意图片的后缀名,须与实际的文件名保持一致 |
| 52 | update TB_CONFIG set CONFIG_VALUE='cas-server-site-ui__logo.png' where ID='51'; -- casServer.config.logo |
| 53 | update TB_CONFIG set CONFIG_VALUE='cas-server-site-ui__logo.png' where ID='52'; -- casServer.config.logoM |
| 54 | |
| 55 | update TB_CONFIG set CONFIG_VALUE='cas-server-site-ui__bg.png' where ID='53'; -- casServer.config.bg |
| 56 | update TB_CONFIG set CONFIG_VALUE='cas-server-site-ui__bg.png' where ID='54'; -- casServer.config.bgM |
| 57 | |
| 58 | update TB_CONFIG set CONFIG_VALUE='409EFF' where ID='55'; -- casServer.config.schemeColor |
| 59 | |
| 60 | update TB_CONFIG set CONFIG_VALUE='cas-server-site-ui__icon.png' where ID='56'; -- casServer.config.iconImageUrl |
| 61 | |
| 62 | update TB_CONFIG set CONFIG_VALUE='https://example.com/download.htm' where ID='57'; -- casServer.config.superappDownloadUrl |
| 63 | update TB_CONFIG set CONFIG_VALUE='超级APP' where ID='57-1'; -- casServer.config.superappName |
| 64 | |
| 65 | update TB_CONFIG set CONFIG_VALUE='cas-server-site-ui__favicon.ico' where ID='58'; -- casServer.config.webFavicon |
| 66 | update TB_CONFIG set CONFIG_VALUE='树维信息' where ID='59'; -- casServer.config.webTitle |
| 67 | |
| 68 | update TB_CONFIG set CONFIG_VALUE='' where ID='61'; -- casServer.config.copyrightContent |
| 69 | update TB_CONFIG set CONFIG_VALUE='' where ID='62'; -- casServer.config.copyrightContentM |
刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 70 | |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 71 | |
| 72 | |
| 73 | use admin_center; |
| 74 | |
| 75 | |
| 76 | -- 管理接口路由 |
| 77 | |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 78 | delete from TB_MGT_ROUTE where ID in ('20', '40'); |
| 79 | |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 80 | insert into TB_MGT_ROUTE (ID, DELETED, CODE, NAME, STATUS, PATH_PREFIX, URL, STRIP_PREFIX) |
| 81 | values ('20', 0, 'authx-service-user-api', '认证授权 - 用户接口', '1', '/api/v1/base', 'https://localhost:8022', 0); |
| 82 | |
| 83 | insert into TB_MGT_ROUTE (ID, DELETED, CODE, NAME, STATUS, PATH_PREFIX, URL, STRIP_PREFIX) |
| 84 | values ('40', 0, 'authx-service-personal-api', '认证授权 - 个人信息接口', '1', '/api/v1/personal', 'http://localhost:8041/api/v1', 1); |
| 85 | |
| 86 | insert into TB_MGT_ROUTE (ID, DELETED, CODE, NAME, STATUS, PATH_PREFIX, URL, STRIP_PREFIX) |
| 87 | values ('21', 0, 'authx-service-admin-api', '认证授权 - 聚合接口(认证、授权)', '1', '/api/v2/admin', 'http://localhost:8009', 0); |
| 88 | insert into TB_MGT_ROUTE (ID, DELETED, CODE, NAME, STATUS, PATH_PREFIX, URL, STRIP_PREFIX) |
| 89 | values ('22', 0, 'authx-service-open-api', '认证授权 - 聚合接口(公开)', '1', '/api/v2/open', 'http://localhost:8009', 0); |
| 90 | |
| 91 | commit; |
| 92 | |
刘洪青 | eb931d9 | 2021-07-12 17:11:08 +0800 | [diff] [blame] | 93 | update TB_MGT_ROUTE set URL='http://user-data-service-goa-svc.user-data-service.svc.cluster.local:8080' where ID='20'; |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 94 | |
刘洪青 | eb931d9 | 2021-07-12 17:11:08 +0800 | [diff] [blame] | 95 | update TB_MGT_ROUTE set URL='http://personal-security-center-bff-svc.personal-security-center.svc.cluster.local:8080/api/v1' where ID='40'; |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 96 | |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 97 | update TB_MGT_ROUTE set URL='http://authx-service-bff-svc.authx-service.svc.cluster.local:8080' where ID='21'; |
| 98 | update TB_MGT_ROUTE set URL='http://authx-service-bff-svc.authx-service.svc.cluster.local:8080' where ID='22'; |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 99 | |
| 100 | commit; |
| 101 | |
| 102 | |
| 103 | -- 应用 |
| 104 | |
| 105 | insert into TB_MGT_APPLICATION (ID, DELETED, CODE, NAME, STATUS) |
| 106 | values ('10', 0, '10', '用户授权', '1'); |
| 107 | |
| 108 | commit; |
| 109 | |
| 110 | |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 111 | update TB_MGT_PERMISSION |
| 112 | set APPLICATION_ID='10' |
| 113 | where (ID like '2____' or ID like '3____' or ID like '4____') |
| 114 | ; |
| 115 | |
| 116 | commit; |
| 117 | |
| 118 | |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 119 | -- 菜单 |
| 120 | |
| 121 | /* |
| 122 | -- 认证管理 |
| 123 | |
| 124 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 125 | values ('20000', 0, 'cas-server', '认证管理', '1', '2', '', '/', '10', '1', 20000, 1, 18, 33); |
| 126 | |
| 127 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 128 | values ('20100', 0, 'loginConfig', '登录方式配置', '1', '2', 'su-icon-denglupeizhi', '/cas-server/loginConfig', '10', '20000', 20100, 2, 19, 20); |
| 129 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 130 | values ('20200', 0, 'safeLoginConfig', '账号安全配置', '1', '2', 'su-icon-config-security', '/cas-server/safeLoginConfig', '10', '20000', 20200, 2, 21, 22); |
| 131 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 132 | values ('20300', 0, 'accountActivationConfiguration', '账号激活配置', '1', '2', 'su-icon-bulb', '/cas-server/accountActivationConfiguration', '10', '20000', 20300, 2, 23, 24); |
| 133 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 134 | values ('20400', 0, 'safeConfig', '安全策略配置', '1', '2', 'su-icon-celuepeizhi', '/cas-server/safeConfig', '10', '20000', 20400, 2, 25, 26); |
| 135 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 136 | values ('20500', 0, 'passwordConfig', '密码策略配置', '1', '2', 'su-icon-mimacelue', '/cas-server/passwordConfig', '10', '20000', 20500, 2, 27, 28); |
| 137 | |
| 138 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 139 | values ('20600', 0, 'serverManagement', '应用对接配置', '1', '2', 'el-icon-service', '/cas-server/serverManagement', '10', '20000', 20600, 2, 29, 30); |
| 140 | |
| 141 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 142 | values ('21100', 0, 'analyze', '认证统计分析', '1', '2', 'su-icon-renzhengtongjifenxi', '/cas-server/analyze', '10', '20000', 21100, 2, 31, 32); |
| 143 | |
| 144 | commit; |
| 145 | |
| 146 | -- 用户管理 |
| 147 | |
| 148 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 149 | values ('30000', 0, 'user-server', '用户管理', '1', '2', '', '/', '10', '1', 30000, 1, 34, 53); |
| 150 | |
| 151 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 152 | values ('30100', 0, 'dictionary', '字典管理', '1', '2', 'su-icon-zidian', '/user-server/dictionary', '10', '30000', 30100, 2, 35, 36); |
| 153 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 154 | values ('30200', 0, 'identity', '身份管理', '1', '2', 'su-icon-shenfen', '/user-server/identity', '10', '30000', 30200, 2, 37, 38); |
| 155 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 156 | values ('30300', 0, 'mechanism', '组织机构管理', '1', '2', 'su-icon-department', '/user-server/mechanism', '10', '30000', 30300, 2, 39, 40); |
| 157 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 158 | values ('30400', 0, 'person', '人员管理', '1', '2', 'su-icon-people', '/user-server/person', '10', '30000', 30400, 2, 41, 42); |
| 159 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 160 | values ('30500', 0, 'label', '标签管理', '1', '2', 'su-icon-biaoqian', '/user-server/label', '10', '30000', 30500, 2, 43, 44); |
| 161 | |
| 162 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 163 | values ('30600', 0, 'simpleUserGroupManage', '普通用户组管理', '1', '2', 'su-icon-portrait', '/user-server/simpleUserGroupManage', '10', '30000', 30600, 2, 45, 46); |
| 164 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 165 | values ('30700', 0, 'postUserGroupManage', '岗位用户组管理', '1', '2', 'su-icon-personnel', '/user-server/postUserGroupManage', '10', '30000', 30700, 2, 47, 48); |
| 166 | |
| 167 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 168 | values ('30800', 0, 'assignation', '人员分配', '1', '2', 'su-icon-tihuanbanliren', '/user-server/assignation', '10', '30000', 30800, 2, 49, 50); |
| 169 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 170 | values ('31000', 0, 'activateAccount', '账号激活审核', '1', '2', 'su-icon-yonghushouquan', '/user-server/activateAccount', '10', '30000', 31000, 2, 51, 52); |
| 171 | |
| 172 | commit; |
| 173 | |
| 174 | -- 授权管理 |
| 175 | |
| 176 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 177 | values ('40000', 0, 'authorization-server', '授权管理', '1', '2', '', '/', '10', '1', 40000, 1, 54, 77); |
| 178 | |
| 179 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 180 | values ('40100', 0, 'applicationRole', '角色授权', '1', '2', 'su-icon-yingyongjuese', '/auth-server/applicationRole', '10', '40000', 40100, 2, 55, 56); |
| 181 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 182 | values ('40200', 0, 'authorizationRoleComponent', '角色组授权', '1', '2', 'su-icon-juesezu', '/auth-server/authorizationRoleComponent', '10', '40000', 40200, 2, 57, 58); |
| 183 | |
| 184 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 185 | values ('40300', 0, 'userAuthManagePeople', '用户授权', '1', '2', 'su-icon-yonghushouquan', '/auth-server/userAuthManagePeople', '10', '40000', 40300, 2, 59, 60); |
| 186 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 187 | values ('40400', 0, 'roleAuthManagement', '用户规则授权', '1', '2', 'su-icon-yonghuguize', '/auth-server/roleAuthManagement', '10', '40000', 40400, 2, 61, 62); |
| 188 | |
| 189 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 190 | values ('40500', 0, 'userGroupAuth', '用户组授权', '1', '2', 'su-icon-yonghuguize', '/auth-server/userGroupAuth', '10', '40000', 40500, 2, 63, 64); |
| 191 | |
| 192 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 193 | values ('40900', 0, 'authorizationAndManagement', '分级授权管理', '1', '2', 'su-icon-shouquanjiguanli', '/auth-server/authorizationAndManagement', '10', '40000', 40900, 2, 65, 66); |
| 194 | |
| 195 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 196 | values ('41100', 0, 'accountAuthorizationAudit', '账号授权审计', '1', '2', 'su-icon-zhsqsj', '/auth-server/accountAuthorizationAudit', '10', '40000', 41100, 2, 67, 68); |
| 197 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 198 | values ('41200', 0, 'userAudit', '用户规则权限审计', '1', '2', 'su-icon-yhgzqxsj', '/auth-server/userAudit', '10', '40000', 41200, 2, 69, 70); |
| 199 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 200 | values ('41300', 0, 'rolePermissionAudit', '角色/组授权审计', '1', '2', 'su-icon-jszsqsj', '/auth-server/rolePermissionAudit', '10', '40000', 41300, 2, 71, 72); |
| 201 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 202 | values ('41400', 0, 'authOperationsAudit', '权限操作审计', '1', '2', 'su-icon-qxczsj', '/auth-server/authOperationsAudit', '10', '40000', 41400, 2, 73, 74); |
| 203 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 204 | values ('41500', 0, 'authStatisticalMonitor', '授权统计监控', '1', '2', 'su-icon-sqtjjk', '/auth-server/authStatisticalMonitor', '10', '40000', 41500, 2, 75, 76); |
| 205 | |
| 206 | commit; |
| 207 | */ |
| 208 | |
| 209 | /* |
| 210 | update TB_MGT_PERMISSION |
| 211 | set LFT = LFT+2 |
| 212 | where LFT>=51 |
| 213 | ; |
| 214 | |
| 215 | update TB_MGT_PERMISSION |
| 216 | set RGT = RGT+2 |
| 217 | where RGT>=51 |
| 218 | ; |
| 219 | |
| 220 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 221 | values ('30750', 0, 'userScope', '用户规则', '1', '1', 'el-icon-guide', '/user-server/userScope', '1', '30000', 30750, 2, 51, 52); |
| 222 | |
| 223 | commit; |
| 224 | */ |
| 225 | |
| 226 | |
| 227 | update TB_MGT_PERMISSION |
| 228 | set LFT = LFT+10 |
| 229 | where LFT>=35 |
| 230 | ; |
| 231 | |
| 232 | update TB_MGT_PERMISSION |
| 233 | set RGT = RGT+10 |
| 234 | where RGT>=35 |
| 235 | ; |
| 236 | |
| 237 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 238 | values ('20650', 0, 'casConfig', '认证对接配置', '1', '2', 'el-icon-service', '/cas-server/casConfig', '10', '20000', 20650, 2, 35, 36); |
| 239 | |
| 240 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 241 | values ('20700', 0, 'loginPageConfig', '登录页面配置', '1', '2', 'su-icon-tongxunxinxi', '/cas-server/loginPageConfig', '10', '20000', 20700, 2, 37, 38); |
| 242 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 243 | values ('20800', 0, 'linkLoginConfig', '联合登录配置', '1', '2', 'su-icon-test', '/cas-server/linkLoginConfig', '10', '20000', 20800, 2, 39, 40); |
| 244 | |
| 245 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 246 | values ('20900', 0, 'infoPerfectConfig', '信息完善配置', '1', '2', 'su-icon-chongxintijiao', '/cas-server/infoPerfectConfig', '10', '20000', 20900, 2, 41, 42); |
| 247 | |
| 248 | insert into TB_MGT_PERMISSION (ID, DELETED, CODE, NAME, STATUS, TYPE_, ICON, URL, APPLICATION_ID, PARENT_ID, ORDER_, LEVEL_, LFT, RGT) |
| 249 | values ('21000', 0, 'lockManagement', '认证锁定管理', '1', '2', 'su-icon-shouquanjiguanli', '/cas-server/lockManagement', '10', '20000', 21000, 2, 43, 44); |
| 250 | |
| 251 | commit; |
| 252 | |
| 253 | |
| 254 | |
| 255 | -- 角色权限 |
| 256 | |
| 257 | insert into TB_MGT_ROLE_PERMISSION (ID, DELETED, ROLE_ID, PERMISSION_ID) |
| 258 | |
| 259 | select CONCAT('20_', ID) as ID, 0 as DELETED, '20' as ROLE_ID, ID as PERMISSION_ID |
| 260 | from TB_MGT_PERMISSION |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 261 | where (ID like '2____' or ID='1') |
| 262 | and CONCAT('20_', ID) not in (select ID from TB_MGT_ROLE_PERMISSION) |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 263 | ; |
| 264 | |
| 265 | insert into TB_MGT_ROLE_PERMISSION (ID, DELETED, ROLE_ID, PERMISSION_ID) |
| 266 | |
| 267 | select CONCAT('30_', ID) as ID, 0 as DELETED, '30' as ROLE_ID, ID as PERMISSION_ID |
| 268 | from TB_MGT_PERMISSION |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 269 | where (ID like '3____' or ID='1') |
| 270 | and CONCAT('30_', ID) not in (select ID from TB_MGT_ROLE_PERMISSION) |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 271 | ; |
| 272 | |
| 273 | insert into TB_MGT_ROLE_PERMISSION (ID, DELETED, ROLE_ID, PERMISSION_ID) |
| 274 | |
| 275 | select CONCAT('40_', ID) as ID, 0 as DELETED, '40' as ROLE_ID, ID as PERMISSION_ID |
| 276 | from TB_MGT_PERMISSION |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 277 | where (ID like '4____' or ID='1') |
| 278 | and CONCAT('40_', ID) not in (select ID from TB_MGT_ROLE_PERMISSION) |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 279 | ; |
| 280 | |
| 281 | |
| 282 | insert into TB_MGT_ROLE_PERMISSION (ID, DELETED, ROLE_ID, PERMISSION_ID) |
| 283 | |
| 284 | select CONCAT('41_', ID) as ID, 0 as DELETED, '41' as ROLE_ID, ID as PERMISSION_ID |
| 285 | from TB_MGT_PERMISSION |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 286 | where (ID in ('40000', '40100', '40300', '40400', '40500') or ID='1') |
| 287 | and CONCAT('41_', ID) not in (select ID from TB_MGT_ROLE_PERMISSION) |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 288 | ; |
| 289 | |
| 290 | |
| 291 | insert into TB_MGT_ROLE_PERMISSION (ID, DELETED, ROLE_ID, PERMISSION_ID) |
| 292 | |
| 293 | select CONCAT('42_', ID) as ID, 0 as DELETED, '41' as ROLE_ID, ID as PERMISSION_ID |
| 294 | from TB_MGT_PERMISSION |
刘洪青 | fe452e2 | 2021-08-31 10:58:23 +0800 | [diff] [blame] | 295 | where (ID in ('40000', '40900') or ID='1') |
| 296 | and CONCAT('42_', ID) not in (select ID from TB_MGT_ROLE_PERMISSION) |
刘洪青 | 065af75 | 2021-05-19 13:32:18 +0800 | [diff] [blame] | 297 | ; |
| 298 | |
| 299 | commit; |
| 300 | |