mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
perf: 非本地用户无法解绑飞书、企业微信、钉钉
This commit is contained in:
committed by
Jiangjie.Bai
parent
72693af5fd
commit
8489d94643
@@ -2,16 +2,23 @@
|
||||
<tr>
|
||||
<td>{{ action.title }}:</td>
|
||||
<td>
|
||||
<span>
|
||||
<component
|
||||
:is="iType"
|
||||
v-model="action.attrs.model"
|
||||
v-bind="action.attrs"
|
||||
v-on="callbacks"
|
||||
>
|
||||
{{ label }}
|
||||
</component>
|
||||
</span>
|
||||
<el-popover
|
||||
placement="left-end"
|
||||
trigger="hover"
|
||||
:disabled="!action.attrs.showTip"
|
||||
:content="action.attrs.tip"
|
||||
>
|
||||
<span slot="reference">
|
||||
<component
|
||||
:is="iType"
|
||||
v-model="action.attrs.model"
|
||||
v-bind="action.attrs"
|
||||
v-on="callbacks"
|
||||
>
|
||||
{{ label }}
|
||||
</component>
|
||||
</span>
|
||||
</el-popover>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
@@ -1733,6 +1733,7 @@
|
||||
"UpdateNodeAssetHardwareInfo": "Update node asset hardware information"
|
||||
},
|
||||
"users": {
|
||||
"UnbindHelpText": "The user is not a local user and cannot be unbound. Contact the administrator",
|
||||
"SetStatus": "Set status",
|
||||
"Set": "Set",
|
||||
"NotSet": "Not set",
|
||||
|
||||
@@ -1725,6 +1725,7 @@
|
||||
"UpdateNodeAssetHardwareInfo": "ノード資産ハードウェア情報の更新"
|
||||
},
|
||||
"users": {
|
||||
"UnbindHelpText": "このユーザーはローカルユーザーではありませんので、解除できません。管理者に連絡してください。",
|
||||
"SetStatus": "ステータスの設定",
|
||||
"Set": "設定",
|
||||
"NotSet": "未設定",
|
||||
|
||||
@@ -1720,6 +1720,7 @@
|
||||
"UpdateNodeAssetHardwareInfo": "更新节点资产硬件信息"
|
||||
},
|
||||
"users": {
|
||||
"UnbindHelpText": "此用户非本地用户,无法进行解绑,请联系管理员",
|
||||
"SetStatus": "设置状态",
|
||||
"Set": "已设置",
|
||||
"NotSet": "未设置",
|
||||
|
||||
@@ -63,7 +63,10 @@ export default {
|
||||
title: this.$t('users.setWeCom'),
|
||||
attrs: {
|
||||
type: 'primary',
|
||||
label: this.$store.state.users.profile.wecom_id ? this.$t('common.unbind') : this.$t('common.bind')
|
||||
label: this.$store.state.users.profile.wecom_id ? this.$t('common.unbind') : this.$t('common.bind'),
|
||||
disabled: this.isComponentDisabled('wecom_id'),
|
||||
showTip: this.isComponentDisabled('wecom_id'),
|
||||
tip: this.$t('users.UnbindHelpText')
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_WECOM,
|
||||
callbacks: {
|
||||
@@ -77,7 +80,10 @@ export default {
|
||||
title: this.$t('users.setDingTalk'),
|
||||
attrs: {
|
||||
type: 'primary',
|
||||
label: this.$store.state.users.profile.dingtalk_id ? this.$t('common.unbind') : this.$t('common.bind')
|
||||
label: this.$store.state.users.profile.dingtalk_id ? this.$t('common.unbind') : this.$t('common.bind'),
|
||||
disabled: this.isComponentDisabled('dingtalk_id'),
|
||||
showTip: this.isComponentDisabled('dingtalk_id'),
|
||||
tip: this.$t('users.UnbindHelpText')
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_DINGTALK,
|
||||
callbacks: {
|
||||
@@ -91,7 +97,10 @@ export default {
|
||||
title: this.$t('users.setFeiShu'),
|
||||
attrs: {
|
||||
type: 'primary',
|
||||
label: this.$store.state.users.profile.feishu_id ? this.$t('common.unbind') : this.$t('common.bind')
|
||||
label: this.$store.state.users.profile.feishu_id ? this.$t('common.unbind') : this.$t('common.bind'),
|
||||
disabled: this.isComponentDisabled('feishu_id'),
|
||||
showTip: this.isComponentDisabled('feishu_id'),
|
||||
tip: this.$t('users.UnbindHelpText')
|
||||
},
|
||||
has: this.$store.getters.publicSettings.AUTH_FEISHU,
|
||||
callbacks: {
|
||||
@@ -300,6 +309,9 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
isComponentDisabled(source) {
|
||||
return !!this.$store.state.users.profile[source] && this.$store.state.users.profile.source.value !== 'local'
|
||||
},
|
||||
updateUserReceiveBackends(val) {
|
||||
this.$axios.patch(
|
||||
`/api/v1/notifications/user-msg-subscription/${this.object.id}/`,
|
||||
|
||||
Reference in New Issue
Block a user