(improvement)(auth) support super admin configuration

This commit is contained in:
jolunoluo
2023-09-20 11:08:40 +08:00
parent 3fe726ac23
commit b824cd8ce7
27 changed files with 273 additions and 158 deletions

View File

@@ -126,7 +126,7 @@ public class SchemaServiceImpl implements SchemaService {
@Override
public List<ModelResp> getModelList(User user, AuthType authTypeEnum, Long domainId) {
return modelService.getModelListWithAuth(user.getName(), domainId, authTypeEnum);
return modelService.getModelListWithAuth(user, domainId, authTypeEnum);
}
}

View File

@@ -140,7 +140,7 @@ public class DataPermissionAOP {
private boolean doModelAdmin(User user, QueryStructReq queryStructReq) {
Long modelId = queryStructReq.getModelId();
List<ModelResp> modelListAdmin = modelService.getModelListWithAuth(user.getName(), null, AuthType.ADMIN);
List<ModelResp> modelListAdmin = modelService.getModelListWithAuth(user, null, AuthType.ADMIN);
if (CollectionUtils.isEmpty(modelListAdmin)) {
return false;
} else {
@@ -153,7 +153,7 @@ public class DataPermissionAOP {
private void doModelVisible(User user, QueryStructReq queryStructReq) {
Boolean visible = true;
Long modelId = queryStructReq.getModelId();
List<ModelResp> modelListVisible = modelService.getModelListWithAuth(user.getName(), null, AuthType.VISIBLE);
List<ModelResp> modelListVisible = modelService.getModelListWithAuth(user, null, AuthType.VISIBLE);
if (CollectionUtils.isEmpty(modelListVisible)) {
visible = false;
} else {