Merge pull request #2050 from jumpserver/dev

v2.26.0-rc2
This commit is contained in:
Jiangjie.Bai
2022-09-13 17:41:39 +08:00
committed by GitHub
7 changed files with 46 additions and 6 deletions

View File

@@ -1150,6 +1150,10 @@
"reply": "Reply",
"status": "Status",
"title": "Title",
"RelevantApp": "App",
"RelevantAsset": "Asset",
"RelevantCommand": "Command",
"RelevantSystemUser": "System user",
"type": "Type",
"user": "User",
"Status": "Status",

View File

@@ -1182,6 +1182,10 @@
"reply": "返信",
"status": "ステータス",
"title": "タイトル",
"RelevantApp": "するアプリケーション",
"RelevantAsset": "する資産",
"RelevantCommand": "するコマンド",
"RelevantSystemUser": "するシステムユーザー",
"action": "アクション",
"type": "タイプ",
"user": "ユーザー",

View File

@@ -1183,6 +1183,10 @@
"reply": "回复",
"status": "状态",
"title": "标题",
"RelevantApp": "应用",
"RelevantAsset": "资产",
"RelevantCommand": "命令",
"RelevantSystemUser": "系统用户",
"action": "动作",
"type": "类型",
"user": "用户",

View File

@@ -37,10 +37,13 @@ export function encryptPassword(password) {
if (!password) {
return ''
}
let rsaPublicKeyText = getCookie('jms_public_key')
if (!rsaPublicKeyText) {
return password
}
const aesKey = (Math.random() + 1).toString(36).substring(2)
// public key 是 base64 存储的
const rsaPublicKeyText = getCookie('jms_public_key')
.replaceAll('"', '')
rsaPublicKeyText = rsaPublicKeyText.replaceAll('"', '')
const rsaPublicKey = atob(rsaPublicKeyText)
const keyCipher = rsaEncrypt(aesKey, rsaPublicKey)
const passwordCipher = aesEncrypt(password, aesKey)

View File

@@ -2,14 +2,14 @@ import { ORACLE, MONGODB, REDIS } from '../const'
export function getDatabaseTypeFieldsMap(type) {
const baseParams = ['host', 'port', 'database']
const tlsParams = ['use_ssl', 'allow_invalid_cert', 'ca_cert']
const tlsParams = ['use_ssl', 'ca_cert']
switch (type) {
case ORACLE:
return baseParams.concat(['version'])
case REDIS:
return baseParams.concat(tlsParams.concat(['client_cert', 'cert_key']))
case MONGODB:
return baseParams.concat(tlsParams.concat(['cert_key']))
return baseParams.concat(tlsParams.concat(['cert_key', 'allow_invalid_cert']))
default:
return baseParams
}

View File

@@ -141,7 +141,7 @@ export default {
valueLabel: this.$t('tickets.Pending')
}
},
exclude: ['state'],
exclude: ['state', 'id', 'title'],
options: [
{
value: 'state',
@@ -162,6 +162,30 @@ export default {
label: this.$t('tickets.Rejected')
}
]
},
{
value: 'id',
label: 'ID'
},
{
value: 'title',
label: this.$t('tickets.title')
},
{
value: 'relevant_app',
label: this.$t('tickets.RelevantApp')
},
{
value: 'relevant_asset',
label: this.$t('tickets.RelevantAsset')
},
{
value: 'relevant_system_user',
label: this.$t('tickets.RelevantCommand')
},
{
value: 'relevant_command',
label: this.$t('tickets.RelevantSystemUser')
}
]
},

View File

@@ -42,7 +42,8 @@ export default {
InviteLoading: false,
formConfig: {
url: '/api/v1/users/users/invite/',
method: 'post',
getUrl: () => '/api/v1/users/users/invite/',
submitMethod: () => 'post',
hasReset: false,
hasSaveContinue: false,
createSuccessMsg: this.$t('users.InviteSuccess'),