mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
perf: 优化认证中的url检查 (#1050)
* perf: 优化认证中的url检查 * perf: 优化配置 Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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: {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user