Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
eb39fb74
提交
eb39fb74
authored
6月 02, 2021
作者:
taojinlong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: 刷新token时,校验用户;国际化问题
上级
32a99801
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
34 行增加
和
12 行删除
+34
-12
JWTFilter.java
backend/src/main/java/io/dataease/auth/filter/JWTFilter.java
+5
-1
messages_en_US.properties
backend/src/main/resources/i18n/messages_en_US.properties
+2
-0
messages_zh_CN.properties
backend/src/main/resources/i18n/messages_zh_CN.properties
+5
-3
messages_zh_TW.properties
backend/src/main/resources/i18n/messages_zh_TW.properties
+2
-0
en.js
frontend/src/lang/en.js
+4
-0
tw.js
frontend/src/lang/tw.js
+6
-2
zh.js
frontend/src/lang/zh.js
+8
-4
message.js
frontend/src/utils/message.js
+2
-2
没有找到文件。
backend/src/main/java/io/dataease/auth/filter/JWTFilter.java
浏览文件 @
eb39fb74
...
...
@@ -7,6 +7,7 @@ import io.dataease.auth.service.AuthUserService;
import
io.dataease.auth.util.JWTUtils
;
import
io.dataease.commons.utils.CommonBeanFactory
;
import
io.dataease.commons.utils.ServletUtils
;
import
io.dataease.i18n.Translator
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authc.AuthenticationException
;
import
org.apache.shiro.subject.Subject
;
...
...
@@ -26,7 +27,7 @@ public class JWTFilter extends BasicHttpAuthenticationFilter {
private
Logger
LOGGER
=
LoggerFactory
.
getLogger
(
this
.
getClass
());
public
final
static
String
expireMessage
=
"
login token is expire
"
;
public
final
static
String
expireMessage
=
"
Login token is expire.
"
;
/*@Autowired
private AuthUserService authUserService;*/
...
...
@@ -102,6 +103,9 @@ public class JWTFilter extends BasicHttpAuthenticationFilter {
TokenInfo
tokenInfo
=
JWTUtils
.
tokenInfoByToken
(
token
);
AuthUserService
authUserService
=
CommonBeanFactory
.
getBean
(
AuthUserService
.
class
);
SysUserEntity
user
=
authUserService
.
getUserById
(
tokenInfo
.
getUserId
());
if
(
user
==
null
){
throw
new
Exception
(
Translator
.
get
(
"i18n_not_find_user"
));
}
String
password
=
user
.
getPassword
();
// 删除老token操作时间
...
...
backend/src/main/resources/i18n/messages_en_US.properties
浏览文件 @
eb39fb74
...
...
@@ -244,3 +244,4 @@ i18n_username_exists=ID is already exists
i18n_ds_name_exists
=
Datasource name exists
i18n_sync_job_exists
=
There is already a synchronization task running, please try again later
i18n_datasource_check_fail
=
Invalid,please check config
i18n_not_find_user
=
Can not find user.
\ No newline at end of file
backend/src/main/resources/i18n/messages_zh_CN.properties
浏览文件 @
eb39fb74
...
...
@@ -232,8 +232,8 @@ i18n_template_system=系统模板
i18n_template_self
=
用户模板
i18n_name_cant_repeat_same_group
=
同一分组下名称不能重复
i18n_chart_count
=
记录数*
i18n_excel_have_merge_region
=
Excel存在合并单元格
i18n_cron_expression_error
=
Cron表达式校验错误
i18n_excel_have_merge_region
=
Excel
存在合并单元格
i18n_cron_expression_error
=
Cron
表达式校验错误
i18n_same_folder_can_not_repeat
=
相同的目录下名称不能重复
i18n_default_panel
=
默认仪表板
i18n_panel_list
=
仪表板
...
...
@@ -242,7 +242,8 @@ i18n_union_already_exists=关联关系已存在
i18n_union_field_exists
=
两个数据集之间关联不能出现多次相同字段
i18n_cron_time_error
=
开始时间不能大于结束时间
i18n_auth_source_be_canceled
=
当前资源授权权限已经被取消
i18n_username_exists
=
用户
ID
已存在
i18n_username_exists
=
用户
ID
已存在
i18n_ds_name_exists
=
数据源名称已存在
i18n_sync_job_exists
=
已经有同步任务在运行,稍后重试
i18n_datasource_check_fail
=
校验失败,请检查配置信息
i18n_not_find_user
=
未找到用户
\ No newline at end of file
backend/src/main/resources/i18n/messages_zh_TW.properties
浏览文件 @
eb39fb74
...
...
@@ -246,3 +246,4 @@ i18n_username_exists=用戶ID已存在
i18n_ds_name_exists
=
數據源名稱已存在
i18n_sync_job_exists
=
已經有同步任務在運行,稍後重試
i18n_datasource_check_fail
=
校驗失敗,請檢查配置信息
i18n_not_find_user
=
未找到用戶
\ No newline at end of file
frontend/src/lang/en.js
浏览文件 @
eb39fb74
...
...
@@ -268,6 +268,10 @@ export default {
not_equals
:
'Not equals'
,
between
:
'between'
,
current_user
:
'Current User'
},
message_box
:
{
alert
:
'Alert'
,
confirm
:
'Confirm'
}
},
monitor
:
'Monitor'
,
...
...
frontend/src/lang/tw.js
浏览文件 @
eb39fb74
...
...
@@ -83,8 +83,8 @@ export default {
thirdpartyTips
:
'本地不能模拟,请结合自己业务进行模拟!!!'
,
expires
:
'登陸信息过期,请重新登陸'
,
tokenError
:
'信息错误,请重新登陸'
,
username_error
:
'請輸入正確的ID'
,
password_error
:
'密碼不小於
8
位'
username_error
:
'請輸入正確的
ID'
,
password_error
:
'密碼不小於
8
位'
},
commons
:
{
close
:
'关闭'
,
...
...
@@ -268,6 +268,10 @@ export default {
not_equals
:
'不等與'
,
between
:
'之间'
,
current_user
:
'是当前用戶'
},
message_box
:
{
alert
:
'警告'
,
confirm
:
'確認'
}
},
monitor
:
'监控'
,
...
...
frontend/src/lang/zh.js
浏览文件 @
eb39fb74
...
...
@@ -81,10 +81,10 @@ export default {
any
:
'随便填'
,
thirdparty
:
'第三方登录'
,
thirdpartyTips
:
'本地不能模拟,请结合自己业务进行模拟!!!'
,
expires
:
'登录
token
过期,请重新登录'
,
tokenError
:
'
token
错误,请重新登录'
,
username_error
:
'请输入正确的ID'
,
password_error
:
'密码不小于
8
位'
expires
:
'登录
信息
过期,请重新登录'
,
tokenError
:
'
登陆信息
错误,请重新登录'
,
username_error
:
'请输入正确的
ID'
,
password_error
:
'密码不小于
8
位'
},
commons
:
{
close
:
'关闭'
,
...
...
@@ -268,6 +268,10 @@ export default {
not_equals
:
'不等于'
,
between
:
'之间'
,
current_user
:
'是当前用户'
},
message_box
:
{
alert
:
'警告'
,
confirm
:
'确认'
}
},
monitor
:
'监控'
,
...
...
frontend/src/utils/message.js
浏览文件 @
eb39fb74
import
{
MessageBox
,
Message
}
from
'element-ui'
import
i18n
from
'@/lang'
export
const
$alert
=
(
message
,
callback
,
options
)
=>
{
const
title
=
i18n
.
t
(
'common.message_box.alert'
)
const
title
=
i18n
.
t
(
'common
s
.message_box.alert'
)
MessageBox
.
alert
(
message
,
title
,
options
).
then
(()
=>
{
callback
()
})
...
...
@@ -14,7 +14,7 @@ export const $confirm = (message, callback, options = {}) => {
type
:
'warning'
,
...
options
}
const
title
=
i18n
.
t
(
'common.message_box.confirm'
)
const
title
=
i18n
.
t
(
'common
s
.message_box.confirm'
)
MessageBox
.
confirm
(
message
,
title
,
defaultOptions
).
then
(()
=>
{
callback
()
})
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论