refactor(权限管理): 去掉代码里的 is-tester-permission
This commit is contained in:
parent
4af0707288
commit
8ab94c9f27
|
@ -101,6 +101,7 @@ public class ShiroConfig implements EnvironmentAware {
|
|||
}
|
||||
|
||||
@Bean
|
||||
@DependsOn({"lifecycleBeanPostProcessor"})
|
||||
public DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
|
||||
DefaultAdvisorAutoProxyCreator daap = new DefaultAdvisorAutoProxyCreator();
|
||||
daap.setProxyTargetClass(true);
|
||||
|
@ -119,7 +120,7 @@ public class ShiroConfig implements EnvironmentAware {
|
|||
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(DefaultWebSecurityManager sessionManager) {
|
||||
AuthorizationAttributeSourceAdvisor aasa = new AuthorizationAttributeSourceAdvisor();
|
||||
aasa.setSecurityManager(sessionManager);
|
||||
return new AuthorizationAttributeSourceAdvisor();
|
||||
return aasa;
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ms-main-container>
|
||||
<el-card class="table-card" v-loading="result.loading">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="search"
|
||||
<ms-table-header :condition.sync="condition" @search="search"
|
||||
:title="$t('api_report.title')"
|
||||
:show-create="false"/>
|
||||
</template>
|
||||
|
@ -60,7 +60,7 @@
|
|||
<template v-slot:default="scope">
|
||||
<ms-table-operator-button :tip="$t('api_report.detail')" icon="el-icon-s-data"
|
||||
@exec="handleView(scope.row)" type="primary"/>
|
||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('api_report.delete')"
|
||||
<ms-table-operator-button :tip="$t('api_report.delete')"
|
||||
v-permission="['PROJECT_API_REPORT:READ+DELETE']"
|
||||
icon="el-icon-delete" @exec="handleDelete(scope.row)" type="danger"/>
|
||||
</template>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-card class="table-card" v-loading="result.loading">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition"
|
||||
<ms-table-header :condition.sync="condition"
|
||||
@search="initTableData" :showCreate="false"
|
||||
:title="$t('test_track.plan.test_plan')">
|
||||
</ms-table-header>
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
<header-label-operate @exec="customHeader"/>
|
||||
</template>
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator-button class="run-button" :is-tester-permission="true"
|
||||
<ms-table-operator-button class="run-button"
|
||||
:tip="$t('api_test.automation.execute')"
|
||||
icon="el-icon-video-play"
|
||||
@exec="runTestCase(scope.row)"/>
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
<el-table-column :label="$t('commons.operating')" min-width="100">
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('commons.copy')" icon="el-icon-document-copy" type="success" @exec="handleCopy(scope.$index, scope.row)"/>
|
||||
<ms-table-operator-button :tip="$t('commons.copy')" icon="el-icon-document-copy" type="success"
|
||||
@exec="handleCopy(scope.$index, scope.row)"/>
|
||||
<ms-table-operator-button :isTesterPermission="true" :tip="$t('commons.delete')" icon="el-icon-delete" type="danger" @exec="handleDelete(scope.$index)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ms-main-container>
|
||||
<el-card class="table-card" v-loading="result.loading">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="search"
|
||||
<ms-table-header :condition.sync="condition" @search="search"
|
||||
:title="$t('api_report.title')"
|
||||
:show-create="false"/>
|
||||
</template>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<template v-slot:default="scope">
|
||||
<ms-table-operator-button :tip="$t('api_report.detail')" icon="el-icon-s-data"
|
||||
@exec="handleView(scope.row)" type="primary"/>
|
||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('api_report.delete')"
|
||||
<ms-table-operator-button :tip="$t('api_report.delete')"
|
||||
icon="el-icon-delete" @exec="handleDelete(scope.row)" type="danger"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ms-main-container>
|
||||
<el-card class="table-card" v-loading="result.loading">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="search"
|
||||
<ms-table-header :condition.sync="condition" @search="search"
|
||||
:title="$t('commons.test')"
|
||||
@create="create" :createTip="$t('load_test.create')" :runTip="$t('load_test.run')"
|
||||
:show-run="true"
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
<el-table-column :label="$t('commons.operating')" min-width="100">
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('commons.copy')" icon="el-icon-document-copy" type="success" @exec="handleCopy(scope.$index, scope.row)"/>
|
||||
<ms-table-operator-button :tip="$t('commons.copy')" icon="el-icon-document-copy" type="success"
|
||||
@exec="handleCopy(scope.$index, scope.row)"/>
|
||||
<ms-table-operator-button :isTesterPermission="true" :tip="$t('commons.delete')" icon="el-icon-delete" type="danger" @exec="handleDelete(scope.$index)"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<span class="operate-button">
|
||||
<ms-table-button v-permission="createPermission" :is-tester-permission="isTesterPermission" v-if="showCreate" icon="el-icon-circle-plus-outline"
|
||||
:content="createTip" @click="create"/>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-download" v-if="showImport"
|
||||
<ms-table-button icon="el-icon-download" v-if="showImport"
|
||||
:content="importTip" @click="importData"/>
|
||||
<ms-table-button :is-tester-permission="isTesterPermission" v-if="showRun" icon="el-icon-video-play"
|
||||
type="primary"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<ms-main-container>
|
||||
<el-card class="table-card">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="search"
|
||||
<ms-table-header :condition.sync="condition" @search="search"
|
||||
:title="$t('commons.report')"
|
||||
:show-create="false"/>
|
||||
</template>
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
{{ $t('operating_log.change_history') }}
|
||||
</el-link>
|
||||
<el-button :disabled="isReadOnly" type="primary" plain @click="save"
|
||||
v-permission="['PROJECT_PERFORMANCE:READ+RUN']"
|
||||
v-permission="['PROJECT_PERFORMANCE_TEST:READ+EDIT']"
|
||||
>{{ $t('commons.save') }}
|
||||
</el-button>
|
||||
<el-button :disabled="isReadOnly" type="primary" plain @click="saveAndRun"
|
||||
v-permission="['PROJECT_PERFORMANCE:READ+RUN']">
|
||||
v-permission="['PROJECT_PERFORMANCE_TEST:READ+RUN']">
|
||||
{{ $t('load_test.save_and_run') }}
|
||||
</el-button>
|
||||
<el-button :disabled="isReadOnly" type="warning" plain @click="cancel">{{ $t('commons.cancel') }}
|
||||
|
@ -62,7 +62,7 @@ import PerformancePressureConfig from "./components/PerformancePressureConfig";
|
|||
import PerformanceAdvancedConfig from "./components/PerformanceAdvancedConfig";
|
||||
import MsContainer from "../../common/components/MsContainer";
|
||||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import {checkoutTestManagerOrTestUser, getCurrentProjectID} from "@/common/js/utils";
|
||||
import {getCurrentProjectID} from "@/common/js/utils";
|
||||
import MsScheduleConfig from "../../common/components/MsScheduleConfig";
|
||||
import {LIST_CHANGE, PerformanceEvent} from "@/business/components/common/head/ListEvent";
|
||||
import MsChangeHistory from "../../history/ChangeHistory";
|
||||
|
@ -117,18 +117,12 @@ export default {
|
|||
}
|
||||
|
||||
this.isReadOnly = false;
|
||||
if (!checkoutTestManagerOrTestUser()) {
|
||||
this.isReadOnly = true;
|
||||
}
|
||||
this.getTest(to.params.testId);
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.isReadOnly = false;
|
||||
if (!checkoutTestManagerOrTestUser()) {
|
||||
this.isReadOnly = true;
|
||||
}
|
||||
this.getTest(this.$route.params.testId);
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
:destroy-on-close="true"
|
||||
:title="$t('load_test.exist_jmx')" width="70%"
|
||||
:visible.sync="loadFileVisible">
|
||||
<ms-table-header :is-tester-permission="true" title="" :condition.sync="condition" @search="getProjectFiles"
|
||||
<ms-table-header title="" :condition.sync="condition" @search="getProjectFiles"
|
||||
:show-create="false">
|
||||
<template v-slot:button>
|
||||
<el-upload
|
||||
|
@ -19,7 +19,7 @@
|
|||
:on-exceed="handleExceed"
|
||||
:disabled="isReadOnly"
|
||||
:file-list="fileList">
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-upload2"
|
||||
<ms-table-button icon="el-icon-upload2"
|
||||
:content="$t('load_test.upload_jmx')"/>
|
||||
</el-upload>
|
||||
<el-upload
|
||||
|
@ -35,7 +35,7 @@
|
|||
:on-exceed="handleExceed"
|
||||
:disabled="isReadOnly"
|
||||
:file-list="fileList">
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-upload2"
|
||||
<ms-table-button icon="el-icon-upload2"
|
||||
:content="$t('load_test.upload_file')"/>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
@ -82,11 +82,11 @@
|
|||
size="mini"/>
|
||||
</el-tooltip>
|
||||
</el-upload>
|
||||
<ms-table-operator-button :is-tester-permission="true"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
:tip="$t('commons.delete')"
|
||||
@exec="handleDelete(scope.row)">
|
||||
<ms-table-operator-button
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
:tip="$t('commons.delete')"
|
||||
@exec="handleDelete(scope.row)">
|
||||
</ms-table-operator-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<h4>{{ $t('load_test.scenario_list') }}</h4>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="start" align="middle">
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-circle-plus-outline"
|
||||
<ms-table-button icon="el-icon-circle-plus-outline"
|
||||
:content="$t('load_test.load_exist_jmx')" @click="loadJMX()"/>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-share"
|
||||
<ms-table-button icon="el-icon-share"
|
||||
@click="loadApiAutomation()"
|
||||
:content="$t('load_test.load_api_automation_jmx')"/>
|
||||
</el-row>
|
||||
|
@ -58,7 +58,7 @@
|
|||
</el-row>
|
||||
<el-row type="flex" justify="start" align="middle">
|
||||
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-circle-plus-outline"
|
||||
<ms-table-button icon="el-icon-circle-plus-outline"
|
||||
:content="$t('load_test.load_exist_file')" @click="loadFile()"/>
|
||||
</el-row>
|
||||
<el-table class="basic-config" :data="tableData">
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
:title="$t('load_test.exist_jmx')" width="70%"
|
||||
:visible.sync="loadFileVisible">
|
||||
|
||||
<ms-table-header :is-tester-permission="true" title="" :condition.sync="condition" @search="getProjectFiles"
|
||||
<ms-table-header title="" :condition.sync="condition" @search="getProjectFiles"
|
||||
:show-create="false">
|
||||
<template v-slot:button>
|
||||
<el-upload
|
||||
|
@ -18,7 +18,7 @@
|
|||
:http-request="handleUpload"
|
||||
:on-exceed="handleExceed"
|
||||
>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-upload2"
|
||||
<ms-table-button icon="el-icon-upload2"
|
||||
:content="$t('load_test.upload_file')"/>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
@ -65,11 +65,11 @@
|
|||
size="mini"/>
|
||||
</el-tooltip>
|
||||
</el-upload>
|
||||
<ms-table-operator-button :is-tester-permission="true"
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
:tip="$t('commons.delete')"
|
||||
@exec="handleDelete(scope.row)">
|
||||
<ms-table-operator-button
|
||||
icon="el-icon-delete"
|
||||
type="danger"
|
||||
:tip="$t('commons.delete')"
|
||||
@exec="handleDelete(scope.row)">
|
||||
</ms-table-operator-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
<div v-loading="result.loading">
|
||||
<el-card class="table-card">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :create-permission="['PROJECT_MANAGER:READ+CREATE']" :is-tester-permission="true" :condition.sync="condition" @search="search" @create="create"
|
||||
<ms-table-header :create-permission="['PROJECT_MANAGER:READ+CREATE']" :condition.sync="condition"
|
||||
@search="search" @create="create"
|
||||
:create-tip="btnTips" :title="$t('commons.project')">
|
||||
<template v-slot:button>
|
||||
<ms-table-button :is-tester-permission="true" icon="el-icon-box"
|
||||
<ms-table-button icon="el-icon-box"
|
||||
:content="$t('api_test.jar_config.title')" @click="openJarConfig"/>
|
||||
</template>
|
||||
</ms-table-header>
|
||||
|
@ -55,13 +56,13 @@
|
|||
<ms-table-operator
|
||||
:edit-permission="['PROJECT_MANAGER:READ+EDIT']"
|
||||
:delete-permission="['PROJECT_MANAGER:READ+DELETE']"
|
||||
:is-tester-permission="true" @editClick="edit(scope.row)"
|
||||
@deleteClick="handleDelete(scope.row)">
|
||||
@editClick="edit(scope.row)"
|
||||
@deleteClick="handleDelete(scope.row)">
|
||||
<template v-slot:behind>
|
||||
<ms-table-operator-button :is-tester-permission="true"
|
||||
:tip="$t('api_test.environment.environment_config')" icon="el-icon-setting"
|
||||
type="info" @exec="openEnvironmentConfig(scope.row)"/>
|
||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('load_test.other_resource')"
|
||||
<ms-table-operator-button
|
||||
:tip="$t('api_test.environment.environment_config')" icon="el-icon-setting"
|
||||
type="info" @exec="openEnvironmentConfig(scope.row)"/>
|
||||
<ms-table-operator-button :tip="$t('load_test.other_resource')"
|
||||
icon="el-icon-files"
|
||||
type="success" @exec="openFiles(scope.row)"/>
|
||||
</template>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card>
|
||||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="getCustomFields" @create="handleCreate"
|
||||
<ms-table-header :condition.sync="condition" @search="getCustomFields" @create="handleCreate"
|
||||
:create-tip="$t('custom_field.create')" :title="$t('custom_field.name')"/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
ref="msEditDialog">
|
||||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData"
|
||||
:show-create="false"/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
<el-card>
|
||||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData" @create="handleCreate"
|
||||
:create-tip="$t('custom_field.create_issue_template')" :title="$t('custom_field.issue_template')"/>
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData" @create="handleCreate"
|
||||
:create-tip="$t('custom_field.create_issue_template')"
|
||||
:title="$t('custom_field.issue_template')"/>
|
||||
</template>
|
||||
|
||||
<ms-table
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-card>
|
||||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData" @create="handleCreate"
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData" @create="handleCreate"
|
||||
:create-tip="$t('custom_field.template_create')" :title="$t('custom_field.case_template')"/>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<!--操作按钮-->
|
||||
<div class="ms-opt-btn">
|
||||
<el-link type="primary" style="margin-right: 20px" @click="openHis" v-if="form.id">{{$t('operating_log.change_history')}}</el-link>
|
||||
<ms-table-button v-if="type!='add'" :is-tester-permission="true"
|
||||
<ms-table-button v-if="type!='add'"
|
||||
id="inputDelay"
|
||||
type="primary"
|
||||
:content="$t('commons.save')"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<div class="card-container" v-loading="result.loading">
|
||||
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData"
|
||||
:tip="$t('commons.search_by_name_or_id')" title="" :show-create="false"/>
|
||||
<el-table
|
||||
border
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<span class="title">
|
||||
用例评审
|
||||
</span>
|
||||
<ms-table-button :is-tester-permission="true" v-if="!showMyCreator" icon="el-icon-view"
|
||||
<ms-table-button v-if="!showMyCreator" icon="el-icon-view"
|
||||
:content="$t('test_track.review.my_create')" @click="searchMyCreator" style="float: right"/>
|
||||
<ms-table-button :is-tester-permission="true" v-if="showMyCreator" icon="el-icon-view"
|
||||
<ms-table-button v-if="showMyCreator" icon="el-icon-view"
|
||||
:content="$t('test_track.review.reviewed_by_me')" @click="searchMyCreator" style="float: right"/>
|
||||
</div>
|
||||
<el-table
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
<el-card>
|
||||
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="page.condition" @search="getIssues" @create="handleCreate"
|
||||
:create-tip="$t('test_track.issue.create_issue')" :title="$t('test_track.issue.issue_list')" :tip="$t('issue.search_name')" :have-search="false"/>
|
||||
<ms-table-header :condition.sync="page.condition" @search="getIssues" @create="handleCreate"
|
||||
:create-tip="$t('test_track.issue.create_issue')" :title="$t('test_track.issue.issue_list')"
|
||||
:tip="$t('issue.search_name')" :have-search="false"/>
|
||||
</template>
|
||||
|
||||
<ms-table
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="card-container">
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||
<ms-table-header :condition.sync="condition" @search="initTableData"
|
||||
:show-create="false" :tip="$t('commons.search_by_id_name_tag')">
|
||||
|
||||
<!-- 不显示 “全部用例” 标题,使标题为空 -->
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
</template>
|
||||
<template v-slot:default="scope">
|
||||
<ms-table-operator-button class="run-button"
|
||||
v-permission="['PROJECT_PERFORMANCE:READ+RUN']"
|
||||
v-permission="['PROJECT_PERFORMANCE_TEST:READ+RUN']"
|
||||
:tip="$t('api_test.run')"
|
||||
icon="el-icon-video-play"
|
||||
@exec="run(scope.row)"/>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<el-card class="table-card" v-loading="result.loading">
|
||||
<template v-slot:header>
|
||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" :show-create="false"
|
||||
<ms-table-header :condition.sync="condition" :show-create="false"
|
||||
@search="initTableData"
|
||||
:title="$t('test_track.report.name')"/>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue