mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-07 09:58:38 +00:00
Compare commits
2 Commits
pr@dev@ass
...
v2.16.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edb5e1b363 | ||
|
|
3b222c5af0 |
@@ -242,6 +242,8 @@
|
||||
"ReLogin": "重新登录"
|
||||
},
|
||||
"common": {
|
||||
"UserLoginLimit": "用户登录限制",
|
||||
"IPLoginLimit": "IP 登录限制",
|
||||
"Setting": "设置",
|
||||
"ViewMore": "查看更多",
|
||||
"Announcement": "公告",
|
||||
|
||||
@@ -236,6 +236,8 @@
|
||||
"ReLogin": "Re-Login"
|
||||
},
|
||||
"common": {
|
||||
"UserLoginLimit": "User login limit",
|
||||
"IPLoginLimit": "IP login limit",
|
||||
"Setting": "Setting",
|
||||
"ViewMore": "View more",
|
||||
"Announcement": "Announcement",
|
||||
|
||||
@@ -43,22 +43,48 @@ export default {
|
||||
},
|
||||
visible: false,
|
||||
fields: [
|
||||
'SECURITY_LOGIN_LIMIT_COUNT', 'SECURITY_LOGIN_LIMIT_TIME', 'SECURITY_LOGIN_IP_BLACK_LIST',
|
||||
'USER_LOGIN_SINGLE_MACHINE_ENABLED', 'ONLY_ALLOW_EXIST_USER_AUTH',
|
||||
'ONLY_ALLOW_AUTH_FROM_SOURCE'
|
||||
[
|
||||
this.$t('common.UserLoginLimit'),
|
||||
[
|
||||
'SECURITY_LOGIN_LIMIT_COUNT',
|
||||
'SECURITY_LOGIN_LIMIT_TIME'
|
||||
]
|
||||
],
|
||||
[
|
||||
this.$t('common.IPLoginLimit'),
|
||||
[
|
||||
'SECURITY_LOGIN_IP_LIMIT_COUNT',
|
||||
'SECURITY_LOGIN_IP_LIMIT_TIME',
|
||||
'SECURITY_LOGIN_IP_WHITE_LIST',
|
||||
'SECURITY_LOGIN_IP_BLACK_LIST'
|
||||
]
|
||||
],
|
||||
[
|
||||
this.$t('common.Other'),
|
||||
[
|
||||
'USER_LOGIN_SINGLE_MACHINE_ENABLED',
|
||||
'ONLY_ALLOW_EXIST_USER_AUTH',
|
||||
'ONLY_ALLOW_AUTH_FROM_SOURCE'
|
||||
]
|
||||
]
|
||||
],
|
||||
successUrl: { name: 'Settings', params: { activeMenu: 'EmailContent' }},
|
||||
fieldsMeta: {
|
||||
},
|
||||
afterGetFormValue(validValues) {
|
||||
validValues.SECURITY_LOGIN_IP_BLACK_LIST = validValues.SECURITY_LOGIN_IP_BLACK_LIST.toString()
|
||||
validValues.SECURITY_LOGIN_IP_WHITE_LIST = validValues.SECURITY_LOGIN_IP_WHITE_LIST.toString()
|
||||
return validValues
|
||||
},
|
||||
cleanFormValue(value) {
|
||||
const ipBlackList = value.SECURITY_LOGIN_IP_BLACK_LIST
|
||||
const ipWhiltList = value.SECURITY_LOGIN_IP_WHITE_LIST
|
||||
if (!Array.isArray(ipBlackList)) {
|
||||
value.SECURITY_LOGIN_IP_BLACK_LIST = ipBlackList ? ipBlackList.split(',') : []
|
||||
}
|
||||
if (!Array.isArray(ipWhiltList)) {
|
||||
value.SECURITY_LOGIN_IP_WHITE_LIST = ipWhiltList ? ipWhiltList.split(',') : []
|
||||
}
|
||||
return value
|
||||
},
|
||||
url: '/api/v1/settings/setting/?category=security'
|
||||
|
||||
Reference in New Issue
Block a user