fix(系统设置): 一级模块权限控制问题
--bug=1015843 --user=李玉号 【系统设置】用户组与权限,只有首页查看权限的时候,看不到一级模块 https://www.tapd.cn/55049933/s/1224091
This commit is contained in:
parent
5120c1ee98
commit
bf647dc09a
|
@ -181,16 +181,21 @@ public class ApiDefinitionService {
|
|||
buildProjectInfo(resList, request.getProjectId());
|
||||
calculateResult(resList, request.getProjectId());
|
||||
} else {
|
||||
buildProjectInfoWidthoutProject(resList);
|
||||
buildProjectInfoWithoutProject(resList);
|
||||
}
|
||||
return resList;
|
||||
}
|
||||
|
||||
private void buildProjectInfoWidthoutProject(List<ApiDefinitionResult> resList) {
|
||||
private void buildProjectInfoWithoutProject(List<ApiDefinitionResult> resList) {
|
||||
resList.forEach(i -> {
|
||||
Project project = projectMapper.selectByPrimaryKey(i.getProjectId());
|
||||
i.setProjectName(project.getName());
|
||||
i.setVersionEnable(project.getVersionEnable());
|
||||
if (project == null) {
|
||||
i.setProjectName("");
|
||||
i.setVersionEnable(false);
|
||||
} else {
|
||||
i.setProjectName(project.getName());
|
||||
i.setVersionEnable(project.getVersionEnable());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
{{ $t('commons.my_workstation') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/track" v-if="check('testTrack')" onselectstart="return false"
|
||||
v-permission="['PROJECT_TRACK_CASE:READ','PROJECT_TRACK_PLAN:READ','PROJECT_TRACK_REVIEW:READ', 'PROJECT_TRACK_ISSUE:READ', 'PROJECT_TRACK_REPORT:READ']">
|
||||
v-permission="['PROJECT_TRACK_HOME:READ', 'PROJECT_TRACK_CASE:READ','PROJECT_TRACK_PLAN:READ','PROJECT_TRACK_REVIEW:READ', 'PROJECT_TRACK_ISSUE:READ', 'PROJECT_TRACK_REPORT:READ']">
|
||||
{{ $t('test_track.test_track') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/api" @click="active()" v-if="check('api')" onselectstart="return false"
|
||||
v-permission="['PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ']">
|
||||
v-permission="['PROJECT_API_HOME:READ', 'PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ']">
|
||||
{{ $t('commons.api') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/ui" @click="active()" v-if="hasLicense() && check('ui')" onselectstart="return false"
|
||||
|
@ -28,7 +28,7 @@
|
|||
</el-menu-item>
|
||||
<el-menu-item index="/performance" v-if="check('performance')"
|
||||
onselectstart="return false"
|
||||
v-permission="['PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']">
|
||||
v-permission="['PROJECT_PERFORMANCE_HOME:READ', 'PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']">
|
||||
{{ $t('commons.performance') }}
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/report" v-if="check('reportStat')" onselectstart="return false"
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/track" v-if="check('testTrack')" onselectstart="return false"
|
||||
v-permission="['PROJECT_TRACK_CASE:READ','PROJECT_TRACK_PLAN:READ','PROJECT_TRACK_REVIEW:READ', 'PROJECT_TRACK_ISSUE:READ', 'PROJECT_TRACK_REPORT:READ']">
|
||||
v-permission="['PROJECT_TRACK_HOME:READ', 'PROJECT_TRACK_CASE:READ','PROJECT_TRACK_PLAN:READ','PROJECT_TRACK_REVIEW:READ', 'PROJECT_TRACK_ISSUE:READ', 'PROJECT_TRACK_REPORT:READ']">
|
||||
<div>
|
||||
<svg-icon iconClass="track" class-name="ms-menu-img"/>
|
||||
<span slot="title" class="ms-menu-item-title">{{ $t('test_track.test_track') }}</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/api" @click="active()" v-if="check('api')" onselectstart="return false"
|
||||
v-permission="['PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ']">
|
||||
v-permission="['PROJECT_API_HOME:READ', 'PROJECT_API_DEFINITION:READ','PROJECT_API_SCENARIO:READ','PROJECT_API_REPORT:READ']">
|
||||
<div>
|
||||
<svg-icon iconClass="api" class-name="ms-menu-img"/>
|
||||
<span slot="title" class="ms-menu-item-title">{{ $t('commons.api') }}</span>
|
||||
|
@ -43,7 +43,7 @@
|
|||
</el-menu-item>
|
||||
<el-menu-item index="/performance" v-if="check('performance')"
|
||||
onselectstart="return false"
|
||||
v-permission="['PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']">
|
||||
v-permission="['PROJECT_PERFORMANCE_HOME:READ', 'PROJECT_PERFORMANCE_TEST:READ','PROJECT_PERFORMANCE_REPORT:READ']">
|
||||
<div>
|
||||
<svg-icon iconClass="performance" class-name="ms-menu-img"/>
|
||||
<span slot="title" class="ms-menu-item-title">{{ $t('commons.performance') }}</span>
|
||||
|
|
Loading…
Reference in New Issue