fix: 新建用户或LDAP用户如果没有选择项目登录报错
--bug=1007818 --user=lyh [github#7652] 新建用户或LDAP用户如果没有选择项目登录报错 https://www.tapd.cn/55049933/s/1066213
This commit is contained in:
parent
ff22e4fbc8
commit
ec0fbfa500
|
@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
@ -144,6 +145,9 @@ public class WorkspaceService {
|
||||||
.map(RelatedSource::getWorkspaceId)
|
.map(RelatedSource::getWorkspaceId)
|
||||||
.distinct()
|
.distinct()
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isEmpty(wsIds)) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
WorkspaceExample workspaceExample = new WorkspaceExample();
|
WorkspaceExample workspaceExample = new WorkspaceExample();
|
||||||
workspaceExample.createCriteria().andIdIn(wsIds);
|
workspaceExample.createCriteria().andIdIn(wsIds);
|
||||||
return workspaceMapper.selectByExample(workspaceExample);
|
return workspaceMapper.selectByExample(workspaceExample);
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<el-dropdown size="medium" @command="changeWs" placement="bottom" class="align-right">
|
<el-dropdown size="medium" @command="changeWs" placement="bottom" class="align-right"
|
||||||
|
v-permission="['PROJECT_TRACK_CASE:READ','PROJECT_TRACK_PLAN:READ','PROJECT_TRACK_REVIEW:READ',
|
||||||
|
'PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ',
|
||||||
|
'PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_CUSTOM_CODE:READ',
|
||||||
|
'PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']" >
|
||||||
<span class="dropdown-link">
|
<span class="dropdown-link">
|
||||||
{{ currentWorkspaceName }}
|
{{ currentWorkspaceName }}
|
||||||
<i class="el-icon-caret-bottom el-icon--right"/>
|
<i class="el-icon-caret-bottom el-icon--right"/>
|
||||||
</span>
|
</span>
|
||||||
<template v-slot:dropdown>
|
<template v-slot:dropdown>
|
||||||
<el-dropdown-menu v-permission="['PROJECT_TRACK_CASE:READ','PROJECT_TRACK_PLAN:READ','PROJECT_TRACK_REVIEW:READ',
|
<el-dropdown-menu style="margin-top: 5px;">
|
||||||
'PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ',
|
|
||||||
'PROJECT_USER:READ', 'PROJECT_ENVIRONMENT:READ', 'PROJECT_FILE:READ+JAR', 'PROJECT_FILE:READ+FILE', 'PROJECT_OPERATING_LOG:READ', 'PROJECT_CUSTOM_CODE:READ',
|
|
||||||
'PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']" style="margin-top: 5px;">
|
|
||||||
<el-input :placeholder="$t('project.search_by_name')"
|
<el-input :placeholder="$t('project.search_by_name')"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
v-model="searchString"
|
v-model="searchString"
|
||||||
|
|
Loading…
Reference in New Issue