fix(用户组和权限): 服务集成和消息设置权限问题#1004965

This commit is contained in:
shiziyuan9527 2021-07-08 18:19:41 +08:00 committed by 刘瑞斌
parent dceaf7d8e0
commit ecfd7c5088
8 changed files with 24 additions and 7 deletions

View File

@ -1,9 +1,9 @@
<template>
<div style="margin-left: 120px">
<div style="margin-left: 100px">
<el-button type="primary" size="mini" :disabled="!show" @click="testConnection">
{{ $t('ldap.test_connect') }}
</el-button>
<el-button v-if="showEdit" size="mini" @click="edit">
<el-button v-if="showEdit" size="mini" @click="edit" v-permission="editPermission">
{{ $t('commons.edit') }}
</el-button>
<el-button type="primary" v-if="showSave" size="mini" @click="save">
@ -12,7 +12,7 @@
<el-button v-if="showCancel" size="mini" @click="cancelEdit">
{{ $t('organization.integration.cancel_edit') }}
</el-button>
<el-button type="info" size="mini" :disabled="!show" @click="cancelIntegration">
<el-button type="info" size="mini" :disabled="!show" @click="cancelIntegration" v-permission="editPermission">
{{ $t('organization.integration.cancel_integration') }}
</el-button>
</div>
@ -35,6 +35,12 @@ export default {
default: true
},
form: Object,
editPermission: {
type: Array,
default() {
return [];
}
},
},
methods: {
testConnection() {

View File

@ -3,7 +3,7 @@
<el-row>
<el-col :span="10">
<h3>{{ $t('organization.message.defect_task_notification') }}</h3>
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel">
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel" v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']">
{{ $t('organization.message.create_new_notification') }}
</el-button>
<el-popover
@ -113,6 +113,7 @@
size="mini"
v-show="!scope.row.isSet"
@click="handleEditTask(scope.$index,scope.row)"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
>{{ $t('commons.edit') }}
</el-button>
<el-button
@ -121,6 +122,7 @@
size="mini"
v-show="!scope.row.isSet"
@click="deleteRowTask(scope.$index,scope.row)"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
></el-button>
</template>
</el-table-column>

View File

@ -3,7 +3,7 @@
<el-row>
<el-col :span="10">
<h3>{{ $t('organization.message.jenkins_task_notification') }}</h3>
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel">
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel" v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']">
{{ $t('organization.message.create_new_notification') }}
</el-button>
<el-popover
@ -116,6 +116,7 @@
size="mini"
v-if="!scope.row.isSet"
@click="handleEditTask(scope.$index,scope.row)"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
>{{ $t('commons.edit') }}
</el-button>
<el-button
@ -123,6 +124,7 @@
icon="el-icon-delete"
size="mini"
v-show="!scope.row.isSet"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
@click.native.prevent="deleteRowTask(scope.$index,scope.row)"
></el-button>
</template>

View File

@ -34,6 +34,7 @@
<bug-manage-btn @save="save"
@init="init"
:edit-permission="['ORGANIZATION_SERVICE:READ+EDIT']"
@testConnection="testConnection"
@cancelIntegration="cancelIntegration"
@reloadPassInput="reloadPassInput"

View File

@ -15,6 +15,7 @@
<bug-manage-btn @save="save"
@init="init"
:edit-permission="['ORGANIZATION_SERVICE:READ+EDIT']"
@testConnection="testConnection"
@cancelIntegration="cancelIntegration"
@reloadPassInput="reloadPassInput"

View File

@ -3,7 +3,7 @@
<el-row>
<el-col :span="10">
<h3>{{ $t('organization.message.test_plan_task_notification') }}</h3>
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel">
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel" v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']">
{{ $t('organization.message.create_new_notification') }}
</el-button>
<el-popover
@ -112,6 +112,7 @@
size="mini"
v-show="!scope.row.isSet"
@click="handleEditTask(scope.$index,scope.row)"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
>{{ $t('commons.edit') }}
</el-button>
<el-button
@ -119,6 +120,7 @@
icon="el-icon-delete"
size="mini"
v-show="!scope.row.isSet"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
@click.native.prevent="deleteRowTask(scope.$index,scope.row)"
></el-button>
</template>

View File

@ -3,7 +3,7 @@
<el-row>
<el-col :span="10">
<h3>{{ $t('organization.message.test_review_task_notice') }}</h3>
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel">
<el-button icon="el-icon-circle-plus-outline" plain size="mini" @click="handleAddTaskModel" v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']">
{{ $t('organization.message.create_new_notification') }}
</el-button>
<el-popover
@ -113,6 +113,7 @@
size="mini"
v-show="!scope.row.isSet"
@click="handleEditTask(scope.$index,scope.row)"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
>{{ $t('commons.edit') }}
</el-button>
<el-button
@ -120,6 +121,7 @@
icon="el-icon-delete"
size="mini"
v-show="!scope.row.isSet"
v-permission="['ORGANIZATION_MESSAGE:READ+EDIT']"
@click.native.prevent="deleteRowTask(scope.$index,scope.row)"
></el-button>
</template>

View File

@ -18,6 +18,7 @@
<bug-manage-btn @save="save"
@init="init"
:edit-permission="['ORGANIZATION_SERVICE:READ+EDIT']"
@testConnection="testConnection"
@cancelIntegration="cancelIntegration"
@reloadPassInput="reloadPassInput"