mirror of
https://github.com/jumpserver/lina.git
synced 2025-08-28 11:24:25 +00:00
feat: 添加系统用户su_enabled
This commit is contained in:
parent
d2cd0a2242
commit
d62a4ca36e
@ -34,6 +34,7 @@ export default {
|
||||
[this.$t('common.Auth'), ['login_mode', 'auto_generate_key', 'password', 'private_key']],
|
||||
[this.$t('assets.AutoPush'), ['auto_push', 'sudo', 'shell', 'home', 'system_groups']],
|
||||
[this.$t('common.Command filter'), ['cmd_filters']],
|
||||
[this.$t('assets.SwitchUser'), ['su_enabled', 'su_from']],
|
||||
[this.$t('common.Other'), ['priority', 'sftp_root', 'comment']]
|
||||
],
|
||||
fieldsMeta: {
|
||||
@ -64,7 +65,24 @@ export default {
|
||||
hidden: (item) => item.protocol !== 'ssh' || !item.auto_push || item.username_same_with_user,
|
||||
helpText: this.$t('assets.HomeHelpMessage')
|
||||
},
|
||||
system_groups: fields.system_groups
|
||||
system_groups: fields.system_groups,
|
||||
su_enabled: {
|
||||
type: 'switch',
|
||||
hidden: (item) => item.protocol !== 'ssh'
|
||||
},
|
||||
su_from: {
|
||||
hidden: (item) => !item.su_enabled,
|
||||
el: {
|
||||
multiple: false,
|
||||
clearable: true,
|
||||
ajax: {
|
||||
url: '/api/v1/assets/system-users/su-from/',
|
||||
transformOption: (item) => {
|
||||
return { label: item.name + '(' + item.username + ')', value: item.id }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
url: '/api/v1/assets/system-users/'
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user