Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
njgzx
dataease
Commits
d15f4a12
提交
d15f4a12
authored
11月 01, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v1.4' of github.com:dataease/dataease into v1.4
上级
76e1513a
f90cdc7c
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
44 行增加
和
14 行删除
+44
-14
AuthServer.java
...end/src/main/java/io/dataease/auth/server/AuthServer.java
+1
-1
SSOServer.java
...d/src/main/java/io/dataease/plugins/server/SSOServer.java
+1
-1
SysUserService.java
...src/main/java/io/dataease/service/sys/SysUserService.java
+18
-3
V27__de1.4.sql
backend/src/main/resources/db/migration/V27__de1.4.sql
+3
-2
messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+1
-0
messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+1
-0
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+1
-0
form.vue
frontend/src/views/system/user/form.vue
+10
-3
index.vue
frontend/src/views/system/user/index.vue
+8
-4
没有找到文件。
backend/src/main/java/io/dataease/auth/server/AuthServer.java
浏览文件 @
d15f4a12
...
...
@@ -73,7 +73,7 @@ public class AuthServer implements AuthApi {
ldapAddRequest
.
setEnabled
(
1L
);
// ldapAddRequest.setDeptId(1L);
ldapAddRequest
.
setRoleIds
(
new
ArrayList
<
Long
>(){{
add
(
2L
);}});
sysUserService
.
validateExistUser
(
ldapUserEntity
.
getUsername
(),
ldapUserEntity
.
getEmail
());
sysUserService
.
validateExistUser
(
ldapUserEntity
.
getUsername
(),
ldapUserEntity
.
getNickname
(),
ldapUserEntity
.
getEmail
());
sysUserService
.
saveLdapUsers
(
ldapAddRequest
);
}
...
...
backend/src/main/java/io/dataease/plugins/server/SSOServer.java
浏览文件 @
d15f4a12
...
...
@@ -68,7 +68,7 @@ public class SSOServer {
SysUserEntity
sysUserEntity
=
authUserService
.
getUserBySub
(
ssoUserInfo
.
getSub
());
if
(
null
==
sysUserEntity
){
sysUserService
.
validateExistUser
(
ssoUserInfo
.
getUsername
(),
ssoUserInfo
.
getEmail
());
sysUserService
.
validateExistUser
(
ssoUserInfo
.
getUsername
(),
ssoUserInfo
.
get
NickName
(),
ssoUserInfo
.
get
Email
());
sysUserService
.
saveOIDCUser
(
ssoUserInfo
);
sysUserEntity
=
authUserService
.
getUserBySub
(
ssoUserInfo
.
getSub
());
}
...
...
backend/src/main/java/io/dataease/service/sys/SysUserService.java
浏览文件 @
d15f4a12
...
...
@@ -87,6 +87,7 @@ public class SysUserService {
public
int
save
(
SysUserCreateRequest
request
)
{
checkUsername
(
request
);
checkEmail
(
request
);
checkNickName
(
request
);
SysUser
user
=
BeanUtils
.
copyBean
(
new
SysUser
(),
request
);
long
now
=
System
.
currentTimeMillis
();
user
.
setCreateTime
(
now
);
...
...
@@ -183,6 +184,7 @@ public class SysUserService {
public
int
update
(
SysUserCreateRequest
request
)
{
checkUsername
(
request
);
checkEmail
(
request
);
checkNickName
(
request
);
if
(
StringUtils
.
isEmpty
(
request
.
getPassword
()))
{
request
.
setPassword
(
null
);
}
...
...
@@ -300,7 +302,7 @@ public class SysUserService {
return
null
;
}
public
void
validateExistUser
(
String
userName
,
String
email
)
{
public
void
validateExistUser
(
String
userName
,
String
nickName
,
String
email
)
{
SysUserExample
example
=
new
SysUserExample
();
if
(
StringUtils
.
isNotBlank
(
userName
))
{
example
.
createCriteria
().
andUsernameEqualTo
(
userName
);
...
...
@@ -310,13 +312,13 @@ public class SysUserService {
}
}
/*
if (StringUtils.isNotBlank(nickName)) {
if
(
StringUtils
.
isNotBlank
(
nickName
))
{
example
.
createCriteria
().
andNickNameEqualTo
(
nickName
);
List
<
SysUser
>
users
=
sysUserMapper
.
selectByExample
(
example
);
if
(
CollectionUtils
.
isNotEmpty
(
users
))
{
throw
new
RuntimeException
(
"用户姓名【"
+
nickName
+
"】已存在,请联系管理员"
);
}
}
*/
}
example
.
clear
();
if
(
StringUtils
.
isNotBlank
(
email
))
{
example
.
createCriteria
().
andEmailEqualTo
(
email
);
...
...
@@ -366,5 +368,18 @@ public class SysUserService {
}
}
private
void
checkNickName
(
SysUserCreateRequest
request
)
{
SysUserExample
sysUserExample
=
new
SysUserExample
();
SysUserExample
.
Criteria
criteria
=
sysUserExample
.
createCriteria
();
if
(
request
.
getUserId
()
!=
null
)
{
criteria
.
andUserIdNotEqualTo
(
request
.
getUserId
());
}
criteria
.
andNickNameEqualTo
(
request
.
getNickName
());
List
<
SysUser
>
sysUsers
=
sysUserMapper
.
selectByExample
(
sysUserExample
);
if
(
CollectionUtils
.
isNotEmpty
(
sysUsers
))
{
throw
new
RuntimeException
(
Translator
.
get
(
"i18n_nickname_exists"
));
}
}
}
backend/src/main/resources/db/migration/V27__de1.4.sql
浏览文件 @
d15f4a12
...
...
@@ -43,14 +43,15 @@ COMMIT;
ALTER
TABLE
`chart_view`
MODIFY
COLUMN
`name`
varchar
(
1024
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'名称'
AFTER
`id`
,
MODIFY
COLUMN
`title`
varchar
(
1024
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'EChart标题'
AFTER
`
result_mod
e`
;
MODIFY
COLUMN
`title`
varchar
(
1024
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
COMMENT
'EChart标题'
AFTER
`
nam
e`
;
ALTER
TABLE
`chart_view`
ADD
COLUMN
`result_count`
int
(
10
)
COMMENT
'展示结果'
AFTER
`render`
;
ALTER
TABLE
`chart_view`
ADD
COLUMN
`result_mode`
varchar
(
50
)
COMMENT
'展示模式'
AFTER
`result_count`
;
UPDATE
`chart_view`
SET
`result_count`
=
1000
;
UPDATE
`chart_view`
SET
`result_mode`
=
'custom'
;
ALTER
TABLE
`dataset_table`
MODIFY
COLUMN
`name`
varchar
(
128
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_general_ci
NULL
DEFAULT
NULL
;
-- ----------------------------
-- Table structure for sys_theme
...
...
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
d15f4a12
...
...
@@ -244,6 +244,7 @@ i18n_union_field_exists=The same field can't in two dataset
i18n_cron_time_error
=
Start time can't greater then end time
i18n_auth_source_be_canceled
=
This Auth Resource Already Be Canceled,Please Connect Admin
i18n_username_exists
=
ID is already exists
i18n_nickname_exists
=
NickName is already exists
i18n_email_exists
=
Email is already exists
i18n_ds_name_exists
=
Datasource name used
i18n_sync_job_exists
=
There is already a synchronization task running, please try again later
...
...
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
d15f4a12
...
...
@@ -243,6 +243,7 @@ i18n_union_field_exists=两个数据集之间关联不能出现多次相同字
i18n_cron_time_error
=
开始时间不能大于结束时间
i18n_auth_source_be_canceled
=
本用户当前资源所有授权权限已经被取消,如需再次开通,请联系管理员
i18n_username_exists
=
用户 ID 已存在
i18n_nickname_exists
=
用户 姓名 已存在
i18n_email_exists
=
邮箱已存在
i18n_ds_name_exists
=
数据源名称已被使用
i18n_sync_job_exists
=
已经有同步任务在运行,稍后重试
...
...
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
d15f4a12
...
...
@@ -246,6 +246,7 @@ i18n_union_field_exists=兩個數據集之間關聯不能出現多次相同字
i18n_cron_time_error
=
開始時間不能大於結束時間
i18n_auth_source_be_canceled
=
本用户当前资源所有授权权限已经被取消,如需再次开通,请联系管理员
i18n_username_exists
=
用戶ID已存在
i18n_nickname_exists
=
用戶 姓名 已存在
i18n_email_exists
=
郵箱已存在
i18n_ds_name_exists
=
數據源名稱已被使用
i18n_sync_job_exists
=
已經有同步任務在運行,稍後重試
...
...
frontend/src/views/system/user/form.vue
浏览文件 @
d15f4a12
...
...
@@ -32,7 +32,7 @@
<el-radio
:label=
"0"
>
{{
$t
(
'commons.disable'
)
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
:label=
"$t('commons.organization')"
prop=
"deptId"
>
<el-form-item
v-show=
"isPluginLoaded"
:label=
"$t('commons.organization')"
prop=
"deptId"
>
<treeselect
ref=
"deptTreeSelect"
v-model=
"form.deptId"
...
...
@@ -43,7 +43,7 @@
@
open=
"filterData"
/>
</el-form-item>
<el-form-item
:label=
"$t('commons.role')"
prop=
"roleIds"
>
<el-form-item
v-show=
"isPluginLoaded"
:label=
"$t('commons.role')"
prop=
"roleIds"
>
<el-select
ref=
"roleSelect"
v-model=
"form.roleIds"
...
...
@@ -76,6 +76,7 @@ import LayoutContent from '@/components/business/LayoutContent'
import
{
PHONE_REGEX
}
from
'@/utils/validate'
import
{
getDeptTree
,
treeByDeptId
}
from
'@/api/system/dept'
import
{
addUser
,
editUser
,
allRoles
}
from
'@/api/system/user'
import
{
pluginLoaded
}
from
'@/api/user'
export
default
{
components
:
{
LayoutContent
},
...
...
@@ -155,7 +156,8 @@ export default {
roles
:
[],
roleDatas
:
[],
userRoles
:
[],
formType
:
'add'
formType
:
'add'
,
isPluginLoaded
:
false
}
},
...
...
@@ -174,6 +176,11 @@ export default {
destroyed
()
{
this
.
unBindKey
()
},
beforeCreate
()
{
pluginLoaded
().
then
(
res
=>
{
this
.
isPluginLoaded
=
res
.
success
&&
res
.
data
})
},
methods
:
{
entryKey
(
event
)
{
const
keyCode
=
event
.
keyCode
...
...
frontend/src/views/system/user/index.vue
浏览文件 @
d15f4a12
...
...
@@ -27,12 +27,12 @@
</el-table-column>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"email"
:label=
"$t('commons.email')"
/>
<el-table-column
:show-overflow-tooltip=
"true"
prop=
"dept"
sortable=
"custom"
:label=
"$t('commons.organization')"
>
<el-table-column
v-if=
"isPluginLoaded"
:show-overflow-tooltip=
"true"
prop=
"dept"
sortable=
"custom"
:label=
"$t('commons.organization')"
>
<
template
slot-scope=
"scope"
>
<div>
{{
scope
.
row
.
dept
&&
scope
.
row
.
dept
.
deptName
}}
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"roles"
:label=
"$t('commons.role')"
>
<el-table-column
v-if=
"isPluginLoaded"
prop=
"roles"
:label=
"$t('commons.role')"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.roles && scope.row.roles.length
<
=
2
"
>
<div
v-for=
"role in scope.row.roles"
:key=
"role.roleId"
>
{{
role
.
roleName
}}
</div>
...
...
@@ -174,7 +174,7 @@ import { PHONE_REGEX } from '@/utils/validate'
import
{
LOAD_CHILDREN_OPTIONS
,
LOAD_ROOT_OPTIONS
}
from
'@riophae/vue-treeselect'
import
Treeselect
from
'@riophae/vue-treeselect'
import
'@riophae/vue-treeselect/dist/vue-treeselect.css'
import
{
ldapStatus
}
from
'@/api/user'
import
{
ldapStatus
,
pluginLoaded
}
from
'@/api/user'
import
{
userLists
,
addUser
,
editUser
,
delUser
,
editPassword
,
editStatus
,
allRoles
}
from
'@/api/system/user'
import
{
getDeptTree
,
treeByDeptId
}
from
'@/api/system/dept'
...
...
@@ -306,7 +306,8 @@ export default {
},
orderConditions
:
[],
last_condition
:
null
,
openLdap
:
false
openLdap
:
false
,
isPluginLoaded
:
false
}
},
mounted
()
{
...
...
@@ -317,6 +318,9 @@ export default {
ldapStatus
().
then
(
res
=>
{
this
.
openLdap
=
res
.
success
&&
res
.
data
})
pluginLoaded
().
then
(
res
=>
{
this
.
isPluginLoaded
=
res
.
success
&&
res
.
data
})
},
methods
:
{
sortChange
({
column
,
prop
,
order
})
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论