mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
perf: 仅本地用户允许使用 passkey
This commit is contained in:
@@ -94,10 +94,10 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
title: this.$t('common.CurrentUserVerify'),
|
||||
smsBtnText: this.$t('common.SendVerificationCode'),
|
||||
smsWidth: 0,
|
||||
subTypeSelected: '',
|
||||
inputPlaceholder: '',
|
||||
smsBtnText: this.$t('common.SendVerificationCode'),
|
||||
smsBtnDisabled: false,
|
||||
confirmTypeRequired: '',
|
||||
subTypeChoices: [],
|
||||
@@ -119,7 +119,7 @@ export default {
|
||||
watch: {
|
||||
visible(val) {
|
||||
if (!val) {
|
||||
this.$emit('onConfirmCancel', true)
|
||||
this.$emit('onConfirmFinal', true)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -189,6 +189,7 @@ export default {
|
||||
}).catch((e) => {
|
||||
this.$emit('onHandlerError', e)
|
||||
}).finally(() => {
|
||||
this.$emit('onConfirmFinal')
|
||||
this.visible = false
|
||||
})
|
||||
},
|
||||
|
||||
@@ -2313,5 +2313,10 @@
|
||||
"applets": {
|
||||
"PublishStatus": "Publish status",
|
||||
"NoPublished": "Unpublished"
|
||||
},
|
||||
"profile": {
|
||||
"CreateAccessKey": "Create Access key",
|
||||
"ApiKeyWarning": "To reduce the risk of AccessKey exposure, Secret is provided only during creation and cannot be queried again later. Please keep it safe.",
|
||||
"PasskeyAddDisableInfo": "Your authentication source is {source}, and Passkey addition is not supported."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1023,7 +1023,7 @@
|
||||
"ratio": "スケール",
|
||||
"run": "実行",
|
||||
"runAs": "実行ユーザー",
|
||||
"runningPath":"実行パス",
|
||||
"runningPath": "実行パス",
|
||||
"runTimes": "実行回数",
|
||||
"selectAssetsMessage": "左側の資産を選択し、実行するシステムユーザーを選択し、コマンドを一括実行します",
|
||||
"selectedAssets": "選択済アセット:",
|
||||
@@ -2304,5 +2304,10 @@
|
||||
"applets": {
|
||||
"PublishStatus": "投稿ステータス",
|
||||
"NoPublished": "未発表"
|
||||
},
|
||||
"profile": {
|
||||
"CreateAccessKey": "Create Access key",
|
||||
"ApiKeyWarning": "AccessKeyの漏洩リスクを低減するため、Secretは作成時にのみ提供され、後で再度クエリできません。安全に保管してください。",
|
||||
"PasskeyAddDisableInfo": "あなたの認証元は {source} であり、Passkeyの追加はサポートされていません。"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1878,7 +1878,8 @@
|
||||
},
|
||||
"profile": {
|
||||
"CreateAccessKey": "创建访问密钥",
|
||||
"ApiKeyWarning": "为降低 AccessKey 泄露的风险,只在创建时提供 Secret,后续不可再进行查询,请妥善保存。"
|
||||
"ApiKeyWarning": "为降低 AccessKey 泄露的风险,只在创建时提供 Secret,后续不可再进行查询,请妥善保存。",
|
||||
"PasskeyAddDisableInfo": "你的认证来源是 {source}, 不支持添加 Passkey"
|
||||
},
|
||||
"users": {
|
||||
"LunaSettingUpdate": "Luna 配置设置",
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
:title="$tc('auth.AddPassKey')"
|
||||
:visible.sync="dialogVisible"
|
||||
>
|
||||
<AutoDataForm v-bind="form" @submit="onAddConfirm" />
|
||||
<el-alert v-if="!isLocalUser" :closable="false" class="source-alert" type="error">
|
||||
{{ $t('profile.PasskeyAddDisableInfo', {source: source.label}) }}
|
||||
</el-alert>
|
||||
<AutoDataForm v-else v-bind="form" @submit="onAddConfirm" />
|
||||
</Dialog>
|
||||
</div>
|
||||
</template>
|
||||
@@ -115,6 +118,12 @@ export default {
|
||||
computed: {
|
||||
getRefsListTable() {
|
||||
return this.$refs.GenericListTable.$refs.ListTable.$refs.ListTable || {}
|
||||
},
|
||||
isLocalUser() {
|
||||
return this.source?.value === 'local'
|
||||
},
|
||||
source() {
|
||||
return this.$store.getters.currentUser?.source
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -149,5 +158,8 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang='scss' scoped>
|
||||
.source-alert >>> .el-alert__content {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user