refactor(权限管理): 删除v-roles
This commit is contained in:
parent
dedaa2ecdf
commit
d0896a541a
|
@ -25,19 +25,17 @@
|
|||
{{ $t("i18n.report") }}
|
||||
</el-menu-item>
|
||||
|
||||
<el-submenu v-show="isOldVersion"
|
||||
v-roles="['test_manager','test_user','test_viewer']" index="4">
|
||||
<el-submenu v-show="isOldVersion" index="4">
|
||||
<template v-slot:title>{{ $t('commons.test') }}</template>
|
||||
<ms-recent-list ref="testRecent" :options="testRecent"/>
|
||||
<el-divider class="menu-divider"/>
|
||||
<ms-show-all :index="'/api/test/list/all'"/>
|
||||
<el-menu-item :index="apiTestProjectPath" class="blank_item"></el-menu-item>
|
||||
<ms-create-button v-roles="['test_manager','test_user']" :index="'/api/test/create'"
|
||||
<ms-create-button :index="'/api/test/create'"
|
||||
:title="$t('load_test.create')"/>
|
||||
</el-submenu>
|
||||
|
||||
<el-submenu v-show="isOldVersion"
|
||||
v-roles="['test_manager','test_user','test_viewer']" index="5">
|
||||
<el-submenu v-show="isOldVersion" index="5">
|
||||
<template v-slot:title>{{ $t('commons.report') }}</template>
|
||||
<ms-recent-list ref="reportRecent" :options="reportRecent"/>
|
||||
<el-divider class="menu-divider"/>
|
||||
|
@ -45,8 +43,7 @@
|
|||
</el-submenu>
|
||||
|
||||
|
||||
<el-menu-item v-show="isOldVersion"
|
||||
v-roles="['test_manager','test_user','test_viewer']" :index="'/api/monitor/view'">
|
||||
<el-menu-item v-show="isOldVersion" :index="'/api/monitor/view'">
|
||||
{{ $t('commons.monitor') }}
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-menu class="header-menu" :unique-opened="true" mode="horizontal" default-active="1" router>
|
||||
<!-- 不激活项目路由-->
|
||||
<el-menu-item index="1" v-show="false">Placeholder</el-menu-item>
|
||||
<el-submenu v-roles="['test_manager','test_user','test_viewer']" index="2" popper-class="submenu">
|
||||
<el-submenu index="2" popper-class="submenu">
|
||||
<template v-slot:title>
|
||||
<span class="project-name" :title="currentProject">
|
||||
{{ $t('commons.project') }}: {{ currentProject }}
|
||||
|
@ -10,7 +10,7 @@
|
|||
</template>
|
||||
<search-list :current-project.sync="currentProject"/>
|
||||
<el-divider/>
|
||||
<el-menu-item :index="'/setting/project/create'" v-roles="['test_manager','test_user']">
|
||||
<el-menu-item :index="'/setting/project/create'">
|
||||
<font-awesome-icon :icon="['fa', 'plus']"/>
|
||||
<span style="padding-left: 7px;">{{ $t("project.create") }}</span>
|
||||
</el-menu-item>
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
<template v-slot:default="scope">
|
||||
<ms-table-operator :edit-permission="['WORKSPACE_USER:READ+EDIT']"
|
||||
:delete-permission="['WORKSPACE_USER:READ+DELETE']"
|
||||
:tip2="$t('commons.remove')" @editClick="edit(scope.row)" @deleteClick="del(scope.row)"
|
||||
v-roles="['test_manager']"/>
|
||||
:tip2="$t('commons.remove')" @editClick="edit(scope.row)" @deleteClick="del(scope.row)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
Loading…
Reference in New Issue