Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangzhen
/
shiro-test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 58a94d84
authored
Aug 29, 2024
by
wangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor the classes of the RBAC to PermissionService.
1 parent
2bf04c57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
src/main/java/com/myxrk/rbac/aspect/DataGridMaskAspect.java
src/main/java/com/myxrk/rbac/aspect/DataGridMaskAspect.java
View file @
58a94d8
...
@@ -37,7 +37,7 @@ public class DataGridMaskAspect {
...
@@ -37,7 +37,7 @@ public class DataGridMaskAspect {
}
}
@Around
(
"@annotation(org.springframework.web.bind.annotation.GetMapping)"
)
@Around
(
"@annotation(org.springframework.web.bind.annotation.GetMapping)"
)
public
Object
m
askData
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
public
Object
doM
askData
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
Object
result
=
joinPoint
.
proceed
();
Object
result
=
joinPoint
.
proceed
();
// 仅处理Result类型,来源与ResponseBodyAdvice处理之后的结果
// 仅处理Result类型,来源与ResponseBodyAdvice处理之后的结果
...
@@ -63,7 +63,7 @@ public class DataGridMaskAspect {
...
@@ -63,7 +63,7 @@ public class DataGridMaskAspect {
}
}
// 更具角色控制DataGrid列的显示
// 更具角色控制DataGrid列的显示
m
askData
(
dg
.
value
(),
data
);
doM
askData
(
dg
.
value
(),
data
);
return
result
;
return
result
;
}
}
...
@@ -80,7 +80,7 @@ public class DataGridMaskAspect {
...
@@ -80,7 +80,7 @@ public class DataGridMaskAspect {
return
data
.
get
(
0
).
getClass
();
return
data
.
get
(
0
).
getClass
();
}
}
private
void
m
askData
(
String
dgKey
,
List
<?>
data
)
{
private
void
doM
askData
(
String
dgKey
,
List
<?>
data
)
{
// 获取当前激活角色,激活的角色只能有一个
// 获取当前激活角色,激活的角色只能有一个
Long
role
=
permissionService
.
getActiveRole
();
Long
role
=
permissionService
.
getActiveRole
();
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment