diff --git a/src/views/settings/Auth/index.vue b/src/views/settings/Auth/index.vue index 07ff8bf95..0a3ac995f 100644 --- a/src/views/settings/Auth/index.vue +++ b/src/views/settings/Auth/index.vue @@ -61,6 +61,15 @@ export default { }, AUTH_SSO: { component: SSO + }, + FORGOT_PASSWORD_URL: { + on: { + change([value], updateForm) { + if (value && !value.startsWith('http')) { + updateForm({ FORGOT_PASSWORD_URL: 'http://' + value }) + } + } + } } }, submitMethod() { diff --git a/src/views/settings/Security/index.vue b/src/views/settings/Security/index.vue index 42bc8abec..f8a02732b 100644 --- a/src/views/settings/Security/index.vue +++ b/src/views/settings/Security/index.vue @@ -32,7 +32,7 @@ export default { 'SECURITY_COMMAND_EXECUTION', 'SECURITY_SERVICE_ACCOUNT_REGISTRATION', 'SECURITY_MAX_IDLE_TIME', - // 'SECURITY_WATERMARK_ENABLED', + 'SECURITY_WATERMARK_ENABLED', 'SECURITY_SESSION_SHARE' ] ], @@ -66,6 +66,16 @@ export default { title: this.$t('setting.insecureCommandEmailUpdate') } }, + LOGIN_CONFIRM_ENABLE: { + hidden: () => { + return !this.$store.getters.hasValidLicense + } + }, + SECURITY_WATERMARK_ENABLED: { + hidden: () => { + return !this.$store.getters.hasValidLicense + } + }, PasswordRule: { label: this.$t('setting.PasswordCheckRule'), component: PasswordRule @@ -78,12 +88,6 @@ export default { url: '/api/v1/settings/setting/?category=security' } }, - mounted() { - if (this.$store.getters.hasValidLicense) { - const securityWatermarkEnabled = 'SECURITY_WATERMARK_ENABLED' - this.fields[0][1].splice(3, 0, securityWatermarkEnabled) - } - }, methods: { submitMethod() { return 'patch' diff --git a/src/views/settings/Terminal.vue b/src/views/settings/Terminal.vue index d8fc44448..62ff4d53d 100644 --- a/src/views/settings/Terminal.vue +++ b/src/views/settings/Terminal.vue @@ -16,12 +16,19 @@ export default { return { fields: [ [ - 'KoKo', [ + 'KoKo', + [ 'TERMINAL_PASSWORD_AUTH', 'TERMINAL_PUBLIC_KEY_AUTH', 'TERMINAL_ASSET_LIST_SORT_BY', 'TERMINAL_ASSET_LIST_PAGE_SIZE', 'TERMINAL_TELNET_REGEX' ] ], + [ + 'XRDP', + [ + 'XRDP_ENABLED', 'TERMINAL_RDP_ADDR' + ] + ], [ this.$t('common.Other'), [ @@ -32,6 +39,19 @@ export default { fieldsMeta: { TERMINAL_TELNET_REGEX: { type: 'input' + }, + TERMINAL_RDP_ADDR: { + hidden: () => { + return !this.$store.getters.hasValidLicense + } + }, + XRDP_ENABLED: { + hidden: () => { + return !this.$store.getters.hasValidLicense + }, + el: { + hiddenGroup: true + } } }, url: '/api/v1/settings/setting/?category=terminal', @@ -52,14 +72,6 @@ export default { } }, mounted() { - if (this.$store.getters.hasValidLicense) { - const xRDPFields = [ - 'XRDP', [ - 'TERMINAL_RDP_ADDR', 'XRDP_ENABLED' - ] - ] - this.fields.splice(1, 0, xRDPFields) - } }, methods: { }