mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-31 06:34:13 +00:00
Merge pull request #3246 from jumpserver/pr@dev@feat_support_anonymous_account
feat: 支持授权匿名账号
This commit is contained in:
@@ -1091,6 +1091,7 @@
|
||||
},
|
||||
"perms": {
|
||||
"": "",
|
||||
"AnonymousAccountTip": "Connect asset without using a username and password, and it only supports web-based and custom-type assets.",
|
||||
"AssetPermissionHelpMsg": "Asset permission allows you to authorize the assets to the users. Additionally, you can set some specific action permission.",
|
||||
"AccountsHelp": "All accounts: accounts exists on the asset; Specify accounts: specify the user name of the account under the asset;Manual input: username/password; Same account: The account username name same with login user",
|
||||
"AllAccounts": "All accounts",
|
||||
|
@@ -1090,6 +1090,7 @@
|
||||
},
|
||||
"perms": {
|
||||
"": "",
|
||||
"AnonymousAccountTip": "匿名アカウントとは、資産の接続時にユーザー名とパスワードを使用せず、ウェブタイプとカスタムタイプの資産のみをサポートするものです。",
|
||||
"AssetPermissionHelpMsg": "資産の権限設定では、ユーザーに対して資産へのアクセス権を許可することができます。さらに、特定の操作権限を設定することもできます",
|
||||
"AccountsHelp": "すべてのアカウント: アカウントはアセットに存在します。 アカウントの指定: 資産の下のアカウントのユーザー名を指定します。手入力: ユーザー名/パスワード; 同一アカウント:ログインユーザーと同じアカウントのユーザー名",
|
||||
"AllAccounts": "すべてのアカウント",
|
||||
|
@@ -1090,7 +1090,9 @@
|
||||
"AllAccounts": "所有账号",
|
||||
"AllAccountTip": "资产上已添加的所有账号",
|
||||
"ManualAccount": "手动账号",
|
||||
"AnonymousAccount": "匿名账号",
|
||||
"ManualAccountTip": "登录时手动输入 用户名/密码",
|
||||
"AnonymousAccountTip": "连接资产时不使用用户名和密码,仅支持 web类型 和 自定义类型 的资产",
|
||||
"SameAccount": "同名账号",
|
||||
"SameAccountTip": "与被授权人用户名相同的账号",
|
||||
"SpecAccount": "指定账号",
|
||||
|
@@ -45,7 +45,14 @@
|
||||
|
||||
<script>
|
||||
import { TagInput } from '@/components/FormFields'
|
||||
import { AccountLabelMapper, AllAccount, ManualAccount, SameAccount, SpecAccount } from '@/views/perms/const'
|
||||
import {
|
||||
AccountLabelMapper,
|
||||
AllAccount,
|
||||
AnonymousAccount,
|
||||
ManualAccount,
|
||||
SameAccount,
|
||||
SpecAccount
|
||||
} from '@/views/perms/const'
|
||||
import ListTable from '@/components/ListTable'
|
||||
import Dialog from '@/components/Dialog'
|
||||
|
||||
@@ -109,6 +116,11 @@ export default {
|
||||
label: AccountLabelMapper[SameAccount],
|
||||
value: SameAccount,
|
||||
tip: this.$t('perms.SameAccountTip')
|
||||
},
|
||||
{
|
||||
label: AccountLabelMapper[AnonymousAccount],
|
||||
value: AnonymousAccount,
|
||||
tip: this.$t('perms.AnonymousAccountTip')
|
||||
}
|
||||
]
|
||||
return {
|
||||
@@ -116,7 +128,7 @@ export default {
|
||||
SPEC: SpecAccount,
|
||||
showTemplateDialog: false,
|
||||
choices: choices.filter(i => {
|
||||
const isVirtualAccount = [SameAccount, ManualAccount].includes(i.value)
|
||||
const isVirtualAccount = [SameAccount, ManualAccount, AnonymousAccount].includes(i.value)
|
||||
return !(isVirtualAccount && !this.showVirtualAccount)
|
||||
}),
|
||||
choicesSelected: [this.ALL],
|
||||
|
@@ -45,10 +45,12 @@ export const AllAccount = '@ALL'
|
||||
export const SpecAccount = '@SPEC'
|
||||
export const SameAccount = '@USER'
|
||||
export const ManualAccount = '@INPUT'
|
||||
export const AnonymousAccount = '@ANON'
|
||||
|
||||
export const AccountLabelMapper = {
|
||||
[AllAccount]: i18n.t('perms.AllAccounts'),
|
||||
[SpecAccount]: i18n.t('perms.SpecAccount'),
|
||||
[SameAccount]: i18n.t('perms.SameAccount'),
|
||||
[ManualAccount]: i18n.t('perms.ManualAccount')
|
||||
[ManualAccount]: i18n.t('perms.ManualAccount'),
|
||||
[AnonymousAccount]: i18n.t('perms.AnonymousAccount')
|
||||
}
|
||||
|
Reference in New Issue
Block a user