Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
2365d3f2
提交
2365d3f2
authored
12月 18, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 新增移动端仪表板api
上级
adca61d4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
30 行增加
和
15 行删除
+30
-15
ShiroServiceImpl.java
.../java/io/dataease/auth/service/impl/ShiroServiceImpl.java
+10
-9
IndexController.java
...src/main/java/io/dataease/controller/IndexController.java
+16
-1
request.js
frontend/src/utils/request.js
+4
-5
没有找到文件。
backend/src/main/java/io/dataease/auth/service/impl/ShiroServiceImpl.java
浏览文件 @
2365d3f2
...
@@ -12,12 +12,12 @@ public class ShiroServiceImpl implements ShiroService {
...
@@ -12,12 +12,12 @@ public class ShiroServiceImpl implements ShiroService {
private
final
static
String
ANON
=
"anon"
;
private
final
static
String
ANON
=
"anon"
;
@Override
@Override
public
Map
<
String
,
String
>
loadFilterChainDefinitionMap
()
{
public
Map
<
String
,
String
>
loadFilterChainDefinitionMap
()
{
// 权限控制map
// 权限控制map
Map
<
String
,
String
>
filterChainDefinitionMap
=
new
LinkedHashMap
<>();
Map
<
String
,
String
>
filterChainDefinitionMap
=
new
LinkedHashMap
<>();
// 配置过滤:不会被拦截的链接 -> 放行 start ----------------------------------------------------------
// 配置过滤:不会被拦截的链接 -> 放行 start
// ----------------------------------------------------------
// 放行Swagger2页面,需要放行这些
// 放行Swagger2页面,需要放行这些
filterChainDefinitionMap
.
put
(
"/doc.html**"
,
"doc"
);
filterChainDefinitionMap
.
put
(
"/doc.html**"
,
"doc"
);
...
@@ -42,17 +42,20 @@ public class ShiroServiceImpl implements ShiroService {
...
@@ -42,17 +42,20 @@ public class ShiroServiceImpl implements ShiroService {
filterChainDefinitionMap
.
put
(
"/index.html"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/index.html"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/link.html"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/link.html"
,
ANON
);
// 获取主题信息
//获取主题信息
filterChainDefinitionMap
.
put
(
"/plugin/theme/themes"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/plugin/theme/themes"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/plugin/theme/items/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/plugin/theme/items/**"
,
ANON
);
//验证链接
//
验证链接
filterChainDefinitionMap
.
put
(
"/api/link/validate**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/api/link/validate**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/api/map/areaEntitys/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/api/map/areaEntitys/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/dataset/field/fieldValues/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/dataset/field/fieldValues/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/linkJump/queryPanelJumpInfo/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/linkJump/queryPanelJumpInfo/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/tempMobileLink/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/de-app/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/app.html"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/**/*.json"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/**/*.json"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/system/ui/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/system/ui/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/**/*.js"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/**/*.js"
,
ANON
);
...
@@ -70,7 +73,6 @@ public class ShiroServiceImpl implements ShiroService {
...
@@ -70,7 +73,6 @@ public class ShiroServiceImpl implements ShiroService {
filterChainDefinitionMap
.
put
(
"/plugin/oidc/authInfo"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/plugin/oidc/authInfo"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/sso/callBack*"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/sso/callBack*"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/unauth"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/unauth"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/display/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/display/**"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/tokenExpired"
,
ANON
);
filterChainDefinitionMap
.
put
(
"/tokenExpired"
,
ANON
);
...
@@ -82,7 +84,6 @@ public class ShiroServiceImpl implements ShiroService {
...
@@ -82,7 +84,6 @@ public class ShiroServiceImpl implements ShiroService {
filterChainDefinitionMap
.
put
(
"/api/link/resourceDetail/**"
,
"link"
);
filterChainDefinitionMap
.
put
(
"/api/link/resourceDetail/**"
,
"link"
);
filterChainDefinitionMap
.
put
(
"/api/link/viewDetail/**"
,
"link"
);
filterChainDefinitionMap
.
put
(
"/api/link/viewDetail/**"
,
"link"
);
filterChainDefinitionMap
.
put
(
"/**"
,
"authc"
);
filterChainDefinitionMap
.
put
(
"/**"
,
"authc"
);
filterChainDefinitionMap
.
put
(
"/**"
,
"jwt"
);
filterChainDefinitionMap
.
put
(
"/**"
,
"jwt"
);
...
@@ -90,9 +91,9 @@ public class ShiroServiceImpl implements ShiroService {
...
@@ -90,9 +91,9 @@ public class ShiroServiceImpl implements ShiroService {
return
filterChainDefinitionMap
;
return
filterChainDefinitionMap
;
}
}
@Override
@Override
public
void
updatePermission
(
ShiroFilterFactoryBean
shiroFilterFactoryBean
,
Integer
roleId
,
Boolean
isRemoveSession
)
{
public
void
updatePermission
(
ShiroFilterFactoryBean
shiroFilterFactoryBean
,
Integer
roleId
,
Boolean
isRemoveSession
)
{
}
}
...
...
backend/src/main/java/io/dataease/controller/IndexController.java
浏览文件 @
2365d3f2
...
@@ -19,6 +19,7 @@ import java.io.IOException;
...
@@ -19,6 +19,7 @@ import java.io.IOException;
@RequestMapping
@RequestMapping
public
class
IndexController
{
public
class
IndexController
{
private
static
final
int
FOR_EVER
=
3600
*
24
*
30
*
12
*
10
;
// 10 years in second
@Resource
@Resource
private
DefaultLicenseService
defaultLicenseService
;
private
DefaultLicenseService
defaultLicenseService
;
...
@@ -35,7 +36,6 @@ public class IndexController {
...
@@ -35,7 +36,6 @@ public class IndexController {
return
"index.html"
;
return
"index.html"
;
}
}
@GetMapping
(
"/deApi"
)
@GetMapping
(
"/deApi"
)
public
String
deApi
()
{
public
String
deApi
()
{
F2CLicenseResponse
f2CLicenseResponse
=
defaultLicenseService
.
validateLicense
();
F2CLicenseResponse
f2CLicenseResponse
=
defaultLicenseService
.
validateLicense
();
...
@@ -59,5 +59,20 @@ public class IndexController {
...
@@ -59,5 +59,20 @@ public class IndexController {
}
}
}
}
@GetMapping
(
"/tempMobileLink/{id}/{token}"
)
public
void
tempMobileLink
(
@PathVariable
(
"id"
)
String
id
,
@PathVariable
(
"token"
)
String
token
)
{
String
url
=
"http://localhost:8081/#preview/"
+
id
;
HttpServletResponse
response
=
ServletUtils
.
response
();
Cookie
cookie
=
new
Cookie
(
"Authorization"
,
token
);
cookie
.
setPath
(
"/"
);
cookie
.
setMaxAge
(
FOR_EVER
);
response
.
addCookie
(
cookie
);
try
{
response
.
sendRedirect
(
url
);
}
catch
(
IOException
e
)
{
LogUtil
.
error
(
e
.
getMessage
());
DEException
.
throwException
(
e
);
}
}
}
}
frontend/src/utils/request.js
浏览文件 @
2365d3f2
import
axios
from
'axios'
import
axios
from
'axios'
import
store
from
'@/store'
import
store
from
'@/store'
import
{
$alert
,
$error
}
from
'./message'
import
{
$alert
,
$error
}
from
'./message'
import
{
getToken
,
getIdToken
}
from
'@/utils/auth'
import
{
getToken
,
getIdToken
}
from
'@/utils/auth'
import
Config
from
'@/settings'
import
Config
from
'@/settings'
import
i18n
from
'@/lang'
import
i18n
from
'@/lang'
import
{
tryShowLoading
,
tryHideLoading
}
from
'./loading'
import
{
tryShowLoading
,
tryHideLoading
}
from
'./loading'
import
{
getLinkToken
,
setLinkToken
}
from
'@/utils/auth'
import
{
getLinkToken
,
setLinkToken
}
from
'@/utils/auth'
const
TokenKey
=
Config
.
TokenKey
const
TokenKey
=
Config
.
TokenKey
const
RefreshTokenKey
=
Config
.
RefreshTokenKey
const
RefreshTokenKey
=
Config
.
RefreshTokenKey
const
LinkTokenKey
=
Config
.
LinkTokenKey
const
LinkTokenKey
=
Config
.
LinkTokenKey
import
Cookies
from
'js-cookie'
import
Cookies
from
'js-cookie'
const
getTimeOut
=
()
=>
{
const
getTimeOut
=
()
=>
{
let
time
=
10
let
time
=
10
const
url
=
'/system/requestTimeOut'
const
url
=
'/system/requestTimeOut'
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论