Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
ad9f8b19
Unverified
提交
ad9f8b19
authored
9月 10, 2021
作者:
fit2cloud-chenyw
提交者:
GitHub
9月 10, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #807 from dataease/pr@dev@feat_oidc_sso
fix: 新增用户邮箱重复报错提示
上级
350ef60d
ca42c98c
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
61 行增加
和
4 行删除
+61
-4
.gitignore
.gitignore
+1
-0
XLdapServer.java
...src/main/java/io/dataease/plugins/server/XLdapServer.java
+1
-1
XOidcServer.java
...src/main/java/io/dataease/plugins/server/XOidcServer.java
+27
-0
SysUserService.java
...src/main/java/io/dataease/service/sys/SysUserService.java
+17
-0
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
user.js
frontend/src/api/system/user.js
+1
-1
index.vue
frontend/src/components/Notification/index.vue
+1
-1
zh.js
frontend/src/lang/zh.js
+9
-0
index.vue
frontend/src/views/login/index.vue
+1
-1
没有找到文件。
.gitignore
浏览文件 @
ad9f8b19
...
@@ -40,6 +40,7 @@ yarn-error.log*
...
@@ -40,6 +40,7 @@ yarn-error.log*
pnpm-debug.log*
pnpm-debug.log*
# Editor directories and files
# Editor directories and files
.lh
.idea
.idea
.vscode
.vscode
*.suo
*.suo
...
...
backend/src/main/java/io/dataease/plugins/server/XLdapServer.java
浏览文件 @
ad9f8b19
...
@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.*;
...
@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.List
;
@RequestMapping
(
"/
api
/ldap"
)
@RequestMapping
(
"/
plugin
/ldap"
)
@RestController
@RestController
public
class
XLdapServer
{
public
class
XLdapServer
{
...
...
backend/src/main/java/io/dataease/plugins/server/XOidcServer.java
0 → 100644
浏览文件 @
ad9f8b19
package
io
.
dataease
.
plugins
.
server
;
import
io.dataease.plugins.config.SpringContextUtil
;
import
io.dataease.plugins.xpack.display.dto.response.SysSettingDto
;
import
io.dataease.plugins.xpack.oidc.service.OidcXpackService
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RequestMapping
(
"/plugin/oidc"
)
@RestController
public
class
XOidcServer
{
@PostMapping
(
"/info"
)
public
List
<
SysSettingDto
>
getOidcInfo
()
{
OidcXpackService
oidcXpackService
=
SpringContextUtil
.
getBean
(
OidcXpackService
.
class
);
return
oidcXpackService
.
oidcSettings
();
}
@PostMapping
(
"/save"
)
public
void
save
(
@RequestBody
List
<
SysSettingDto
>
settings
)
{
OidcXpackService
oidcXpackService
=
SpringContextUtil
.
getBean
(
OidcXpackService
.
class
);
oidcXpackService
.
save
(
settings
);
}
}
backend/src/main/java/io/dataease/service/sys/SysUserService.java
浏览文件 @
ad9f8b19
...
@@ -82,6 +82,7 @@ public class SysUserService {
...
@@ -82,6 +82,7 @@ public class SysUserService {
@Transactional
@Transactional
public
int
save
(
SysUserCreateRequest
request
)
{
public
int
save
(
SysUserCreateRequest
request
)
{
checkUsername
(
request
);
checkUsername
(
request
);
checkEmail
(
request
);
SysUser
user
=
BeanUtils
.
copyBean
(
new
SysUser
(),
request
);
SysUser
user
=
BeanUtils
.
copyBean
(
new
SysUser
(),
request
);
long
now
=
System
.
currentTimeMillis
();
long
now
=
System
.
currentTimeMillis
();
user
.
setCreateTime
(
now
);
user
.
setCreateTime
(
now
);
...
@@ -145,6 +146,7 @@ public class SysUserService {
...
@@ -145,6 +146,7 @@ public class SysUserService {
@Transactional
@Transactional
public
int
update
(
SysUserCreateRequest
request
)
{
public
int
update
(
SysUserCreateRequest
request
)
{
checkUsername
(
request
);
checkUsername
(
request
);
checkEmail
(
request
);
if
(
StringUtils
.
isEmpty
(
request
.
getPassword
()))
{
if
(
StringUtils
.
isEmpty
(
request
.
getPassword
()))
{
request
.
setPassword
(
null
);
request
.
setPassword
(
null
);
}
}
...
@@ -287,4 +289,19 @@ public class SysUserService {
...
@@ -287,4 +289,19 @@ public class SysUserService {
throw
new
RuntimeException
(
Translator
.
get
(
"i18n_username_exists"
));
throw
new
RuntimeException
(
Translator
.
get
(
"i18n_username_exists"
));
}
}
}
}
private
void
checkEmail
(
SysUserCreateRequest
request
)
{
SysUserExample
sysUserExample
=
new
SysUserExample
();
SysUserExample
.
Criteria
criteria
=
sysUserExample
.
createCriteria
();
if
(
request
.
getUserId
()
!=
null
)
{
criteria
.
andUserIdNotEqualTo
(
request
.
getUserId
());
}
criteria
.
andEmailEqualTo
(
request
.
getEmail
());
List
<
SysUser
>
sysUsers
=
sysUserMapper
.
selectByExample
(
sysUserExample
);
if
(
CollectionUtils
.
isNotEmpty
(
sysUsers
))
{
throw
new
RuntimeException
(
Translator
.
get
(
"i18n_email_exists"
));
}
}
}
}
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
ad9f8b19
...
@@ -243,6 +243,7 @@ i18n_union_field_exists=The same field can't in two dataset
...
@@ -243,6 +243,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_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_auth_source_be_canceled
=
This Auth Resource Already Be Canceled,Please Connect Admin
i18n_username_exists
=
ID is already exists
i18n_username_exists
=
ID is already exists
i18n_email_exists
=
Email is already exists
i18n_ds_name_exists
=
Datasource name used
i18n_ds_name_exists
=
Datasource name used
i18n_sync_job_exists
=
There is already a synchronization task running, please try again later
i18n_sync_job_exists
=
There is already a synchronization task running, please try again later
i18n_datasource_check_fail
=
Invalid,please check config
i18n_datasource_check_fail
=
Invalid,please check config
...
...
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
ad9f8b19
...
@@ -242,6 +242,7 @@ i18n_union_field_exists=两个数据集之间关联不能出现多次相同字
...
@@ -242,6 +242,7 @@ i18n_union_field_exists=两个数据集之间关联不能出现多次相同字
i18n_cron_time_error
=
开始时间不能大于结束时间
i18n_cron_time_error
=
开始时间不能大于结束时间
i18n_auth_source_be_canceled
=
本用户当前资源所有授权权限已经被取消,如需再次开通,请联系管理员
i18n_auth_source_be_canceled
=
本用户当前资源所有授权权限已经被取消,如需再次开通,请联系管理员
i18n_username_exists
=
用户 ID 已存在
i18n_username_exists
=
用户 ID 已存在
i18n_email_exists
=
邮箱已存在
i18n_ds_name_exists
=
数据源名称已被使用
i18n_ds_name_exists
=
数据源名称已被使用
i18n_sync_job_exists
=
已经有同步任务在运行,稍后重试
i18n_sync_job_exists
=
已经有同步任务在运行,稍后重试
i18n_datasource_check_fail
=
校验失败,请检查配置信息
i18n_datasource_check_fail
=
校验失败,请检查配置信息
...
...
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
ad9f8b19
...
@@ -245,6 +245,7 @@ i18n_union_field_exists=兩個數據集之間關聯不能出現多次相同字
...
@@ -245,6 +245,7 @@ i18n_union_field_exists=兩個數據集之間關聯不能出現多次相同字
i18n_cron_time_error
=
開始時間不能大於結束時間
i18n_cron_time_error
=
開始時間不能大於結束時間
i18n_auth_source_be_canceled
=
本用户当前资源所有授权权限已经被取消,如需再次开通,请联系管理员
i18n_auth_source_be_canceled
=
本用户当前资源所有授权权限已经被取消,如需再次开通,请联系管理员
i18n_username_exists
=
用戶ID已存在
i18n_username_exists
=
用戶ID已存在
i18n_email_exists
=
郵箱已存在
i18n_ds_name_exists
=
數據源名稱已被使用
i18n_ds_name_exists
=
數據源名稱已被使用
i18n_sync_job_exists
=
已經有同步任務在運行,稍後重試
i18n_sync_job_exists
=
已經有同步任務在運行,稍後重試
i18n_datasource_check_fail
=
校驗失敗,請檢查配置信息
i18n_datasource_check_fail
=
校驗失敗,請檢查配置信息
...
...
frontend/src/api/system/user.js
浏览文件 @
ad9f8b19
...
@@ -100,7 +100,7 @@ export function roleGrid(pageIndex, pageSize, data) {
...
@@ -100,7 +100,7 @@ export function roleGrid(pageIndex, pageSize, data) {
export
function
ldapUsers
(
data
)
{
export
function
ldapUsers
(
data
)
{
return
request
({
return
request
({
url
:
'/
api
/ldap/users'
,
url
:
'/
plugin
/ldap/users'
,
method
:
'post'
,
method
:
'post'
,
loading
:
true
loading
:
true
})
})
...
...
frontend/src/components/Notification/index.vue
浏览文件 @
ad9f8b19
...
@@ -232,7 +232,7 @@ export default {
...
@@ -232,7 +232,7 @@ export default {
right
:
178px
;
right
:
178px
;
top
:
8px
;
top
:
8px
;
background
:
red
;
background
:
red
;
//
color: #fff;
color
:
#fff
;
border-radius
:
17px
;
border-radius
:
17px
;
padding
:
4px
7px
;
padding
:
4px
7px
;
font-size
:
16px
;
font-size
:
16px
;
...
...
frontend/src/lang/zh.js
浏览文件 @
ad9f8b19
...
@@ -532,6 +532,15 @@ export default {
...
@@ -532,6 +532,15 @@ export default {
mapping_cannot_be_empty
:
'LDAP 用户属性映射不能为空'
,
mapping_cannot_be_empty
:
'LDAP 用户属性映射不能为空'
,
password_cannot_be_empty
:
'LDAP 密码不能为空'
password_cannot_be_empty
:
'LDAP 密码不能为空'
},
},
oidc
:
{
auth_endpoint
:
'请输入AuthEndpoint'
,
token_endpoint
:
'请输入TokenEndpoint'
,
userinfo_endpoint
:
'请输入UserinfoEndpoint'
,
logout_endpoint
:
'请输入logoutEndpoint'
,
clientId
:
'请输入ClientId'
,
secret
:
'请输入Secret'
,
open
:
'启用OIDC认证'
},
role
:
{
role
:
{
menu_authorization
:
'菜单授权'
,
menu_authorization
:
'菜单授权'
,
data_authorization
:
'数据授权'
,
data_authorization
:
'数据授权'
,
...
...
frontend/src/views/login/index.vue
浏览文件 @
ad9f8b19
...
@@ -108,7 +108,7 @@ export default {
...
@@ -108,7 +108,7 @@ export default {
loginImageUrl
:
null
,
loginImageUrl
:
null
,
loginLogoUrl
:
null
,
loginLogoUrl
:
null
,
axiosFinished
:
false
,
axiosFinished
:
false
,
openLdap
:
tru
e
openLdap
:
fals
e
}
}
},
},
computed
:
{
computed
:
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论