fix: 修复会话详情页button 按钮权限位控制

This commit is contained in:
“huailei000”
2022-04-19 18:15:11 +08:00
committed by 老广
parent c6aaaaf1fd
commit e5b2bd7008
2 changed files with 3 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ export default {
]
for (const preTab of preActiveTabs) {
const currentTab = typeof preTab === 'object' ? preTab.name : preTab
const currentTab = typeof preTab === 'object' ? preTab?.name : preTab
for (const tabName of this.tabIndices) {
const currentTabName = tabName?.name || ''
if (currentTab?.toLowerCase() === currentTabName?.toLowerCase()) {

View File

@@ -40,7 +40,7 @@ export default {
attrs: {
type: 'danger',
label: this.$t('sessions.terminate'),
disabled: !this.session['can_terminate']
disabled: !this.session['can_terminate'] || !vm.$hasPerm('terminal.terminate_session')
},
callbacks: {
click: function() {
@@ -60,7 +60,7 @@ export default {
attrs: {
type: 'primary',
label: this.$t('sessions.Monitor'),
disabled: !this.session['can_join']
disabled: !this.session['can_join'] || !vm.$hasPerm('terminal.monitor_session')
},
callbacks: {
click: function() {