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