Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
d2b557aa
Commit
d2b557aa
authored
Nov 08, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品版本更新分站点
parent
a7939a29
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
device-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthUserInterceptor.java
...s/xhx/base/framework/interceptor/AuthUserInterceptor.java
+2
-3
No files found.
device-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthUserInterceptor.java
View file @
d2b557aa
...
...
@@ -9,7 +9,6 @@ import com.mortals.framework.util.AESUtil;
import
com.mortals.framework.utils.ServletUtils
;
import
com.mortals.framework.web.interceptor.BaseInterceptor
;
import
com.mortals.xhx.base.framework.config.InterceptorConfig
;
import
com.mortals.xhx.common.code.ApiRespCodeEnum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
...
...
@@ -21,7 +20,6 @@ import javax.servlet.http.HttpServletResponse;
import
java.lang.reflect.Method
;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.*;
import
static
com
.
mortals
.
xhx
.
common
.
key
.
ErrorCode
.
ERROR_USER_OPERATION_CONTENT
;
/**
* 用户权限验证,基于token
...
...
@@ -74,7 +72,8 @@ public class AuthUserInterceptor extends BaseInterceptor {
if
(
ObjectUtils
.
isEmpty
(
loginUser
))
{
ServletUtils
.
renderString
(
response
,
JSONObject
.
toJSONString
(
Rest
.
fail
(
ERROR_TOKEN_EXPIRED
,
ERROR_TOKEN_EXPIRED_CONTENT
)));
return
false
;
}
else
if
(
loginUser
.
isAdmin
()
||
loginUser
.
getUserType
()
==
1
)
{
// } else if (loginUser.isAdmin() || loginUser.getUserType() == 1) {
}
else
if
(
loginUser
.
isAdmin
())
{
return
super
.
preHandle
(
request
,
response
,
handler
);
}
else
{
ServletUtils
.
renderString
(
response
,
JSONObject
.
toJSONString
(
Rest
.
fail
(
ERROR_USER_OPERATION
,
ERROR_USER_OPERATION_CONTENT
)));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment