Compare commits

...

8 Commits
dev ... v2.8.3

Author SHA1 Message Date
Orange
45d294ac93 fix: 修复资产更多信息更新失败的问题 2021-04-07 11:02:29 +08:00
Orange
3bb6549d75 fix: 修复命令存储更新失败的问题 2021-03-29 19:26:58 +08:00
Orange
eeb1b85d8a fix: 修复创建远程应用默认Path丢失的问题 2021-03-23 18:50:57 +08:00
Orange
06535c8493 fix: 修复创建K8S系统用户的权限问题 2021-03-23 17:54:48 +08:00
Orange
9487ec3f4c perf: 优化全局组织下禁止用户更新用户组 2021-03-23 17:53:55 +08:00
老广
a5ac9f627a Merge pull request #711 from jumpserver/pr@v2.8@revert_rdp_system_user_group
fix: 恢复RDP系统用户user_group字段
2021-03-23 17:49:28 +08:00
Orange
1f5869b4cc fix: 恢复RDP系统用户user_group字段 2021-03-23 09:02:43 +00:00
老广
7902604952 Merge pull request #704 from jumpserver/master
v2.8.1
2021-03-19 20:06:04 +08:00
6 changed files with 37 additions and 4 deletions

View File

@@ -19,7 +19,9 @@ export default {
return { return {
initial: { initial: {
type: appTypeMeta.name, type: appTypeMeta.name,
path: pathInitial attrs: {
path: pathInitial
}
}, },
fields: [ fields: [
[this.$t('common.Basic'), ['name', 'type']], [this.$t('common.Basic'), ['name', 'type']],

View File

@@ -1,5 +1,5 @@
<template> <template>
<GenericCreateUpdatePage v-bind="$data" /> <GenericCreateUpdatePage v-bind="$data" :perform-submit="performSubmit" />
</template> </template>
<script> <script>
@@ -94,6 +94,19 @@ export default {
updateSuccessNextRoute: { name: 'AssetList' }, updateSuccessNextRoute: { name: 'AssetList' },
createSuccessNextRoute: { name: 'AssetList' } createSuccessNextRoute: { name: 'AssetList' }
} }
},
methods: {
getUrl() {
const params = this.$route.params
let url = this.url
if (params.id) {
url = `${url}${params.id}/`
}
return url
},
performSubmit(validValues) {
return this.$axios['patch'](this.getUrl(), validValues)
}
} }
} }
</script> </script>

View File

@@ -23,7 +23,7 @@ export default {
}, },
fields: [ fields: [
[this.$t('common.Basic'), ['name', 'login_mode', 'username', 'username_same_with_user', 'priority', 'protocol']], [this.$t('common.Basic'), ['name', 'login_mode', 'username', 'username_same_with_user', 'priority', 'protocol']],
[this.$t('assets.AutoPush'), ['auto_push']], [this.$t('assets.AutoPush'), ['auto_push', 'system_groups']],
[this.$t('common.Auth'), ['update_password', 'password', 'ad_domain']], [this.$t('common.Auth'), ['update_password', 'password', 'ad_domain']],
[this.$t('common.Other'), ['comment']] [this.$t('common.Other'), ['comment']]
], ],
@@ -133,6 +133,11 @@ export default {
} }
return !form.update_password return !form.update_password
} }
},
system_groups: {
label: this.$t('assets.LinuxUserAffiliateGroup'),
hidden: (item) => ['ssh', 'rdp'].indexOf(item.protocol) === -1 || !item.auto_push || item.username_same_with_user,
helpText: this.$t('assets.GroupsHelpMessage')
} }
}, },
url: '/api/v1/assets/system-users/', url: '/api/v1/assets/system-users/',

View File

@@ -115,7 +115,6 @@ export default {
name: 'K8S', name: 'K8S',
title: 'K8S', title: 'K8S',
type: 'primary', type: 'primary',
has: this.$store.getters.hasValidLicense,
group: this.$t('assets.OtherProtocol') group: this.$t('assets.OtherProtocol')
} }
] ]

View File

@@ -4,6 +4,7 @@
:create-success-next-route="successUrl" :create-success-next-route="successUrl"
:update-success-next-route="successUrl" :update-success-next-route="successUrl"
:has-detail-in-msg="false" :has-detail-in-msg="false"
:after-get-form-value="afterGetFormValue"
:perform-submit="performSubmit" :perform-submit="performSubmit"
/> />
</template> </template>
@@ -59,6 +60,10 @@ export default {
}, },
methods: { methods: {
afterGetFormValue(validValues) {
validValues.meta.HOSTS = validValues.meta.HOSTS.toString()
return validValues
},
performSubmit(validValues) { performSubmit(validValues) {
const method = this.getMethod() const method = this.getMethod()
validValues.meta.HOSTS = validValues.meta.HOSTS.split(',').map(item => (item.trim())) validValues.meta.HOSTS = validValues.meta.HOSTS.split(',').map(item => (item.trim()))

View File

@@ -10,6 +10,7 @@ import { GenericCreateUpdatePage } from '@/layout/components'
import UserPassword from '@/components/UserPassword' import UserPassword from '@/components/UserPassword'
import RoleCheckbox from '@/views/users/User/components/RoleCheckbox' import RoleCheckbox from '@/views/users/User/components/RoleCheckbox'
import rules from '@/components/DataForm/rules' import rules from '@/components/DataForm/rules'
import { mapGetters } from 'vuex'
export default { export default {
components: { components: {
@@ -109,6 +110,14 @@ export default {
} }
} }
}, },
computed: {
...mapGetters(['currentOrgIsRoot'])
},
mounted() {
if (this.currentOrgIsRoot) {
this.fieldsMeta.groups.el.disabled = true
}
},
methods: { methods: {
cleanFormValue(value) { cleanFormValue(value) {
const method = this.getMethod() const method = this.getMethod()