fix(系统设置): 初始化默认组织及项目管理员
--bug=1034790 --user=宋昌昌 【系统设置】默认组织没有默认的组织管理员 https://www.tapd.cn/55049933/s/1457720
This commit is contained in:
parent
831834cb5d
commit
e57f462e38
|
@ -20,6 +20,8 @@ INSERT INTO user_role (id, name, description, internal, type, create_time, updat
|
|||
|
||||
-- 初始化用户和组的关系
|
||||
INSERT INTO user_role_relation (id, user_id, role_id, source_id, organization_id, create_time, create_user) VALUES (UUID_SHORT(), 'admin', 'admin', 'system', 'system', unix_timestamp() * 1000, 'admin');
|
||||
INSERT INTO user_role_relation (id, user_id, role_id, source_id, organization_id, create_time, create_user) VALUES (UUID_SHORT(), 'admin', 'org_admin', '100001', '100001', unix_timestamp() * 1000, 'admin');
|
||||
INSERT INTO user_role_relation (id, user_id, role_id, source_id, organization_id, create_time, create_user) VALUES (UUID_SHORT(), 'admin', 'project_admin', '100001100001', '100001', unix_timestamp() * 1000, 'admin');
|
||||
|
||||
-- 初始化用户组权限
|
||||
-- 系统管理员拥有所有的权限,不用初始化
|
||||
|
|
|
@ -446,13 +446,7 @@ public class ApiTestCaseControllerTests extends BaseTest {
|
|||
// @@校验日志
|
||||
checkLog(apiTestCase.getId(), OperationLogType.RECOVER);
|
||||
this.requestGet(RECOVER + "111").andExpect(ERROR_REQUEST_MATCHER);
|
||||
ApiTestCase updateCase = new ApiTestCase();
|
||||
updateCase.setId(apiTestCase.getId());
|
||||
updateCase.setApiDefinitionId("aaaa");
|
||||
apiTestCaseMapper.updateByPrimaryKeySelective(updateCase);
|
||||
this.requestGet(RECOVER + apiTestCase.getId()).andExpect(ERROR_REQUEST_MATCHER);
|
||||
updateCase.setApiDefinitionId("apiDefinitionId");
|
||||
apiTestCaseMapper.updateByPrimaryKeySelective(updateCase);
|
||||
|
||||
// @@校验权限
|
||||
requestGetPermissionTest(PermissionConstants.PROJECT_API_DEFINITION_CASE_RECOVER, RECOVER + apiTestCase.getId());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue