Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cneeds-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhangzr
cneeds-server
Commits
dfccfab2
Commit
dfccfab2
authored
Jun 10, 2020
by
zzrdark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修改权限的字段
parent
ff367eff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
MyUserDetailsService.java
...ds/server/anthorization/service/MyUserDetailsService.java
+1
-1
LogController.java
...m/mx/cneeds/server/datashow/web/device/LogController.java
+4
-1
No files found.
cneeds-server-authorization/src/main/java/com/mx/cneeds/server/anthorization/service/MyUserDetailsService.java
View file @
dfccfab2
...
@@ -51,7 +51,7 @@ public class MyUserDetailsService implements UserDetailsService {
...
@@ -51,7 +51,7 @@ public class MyUserDetailsService implements UserDetailsService {
List
<
String
>
funcPerms
=
userDto
.
getFuncPerms
();
List
<
String
>
funcPerms
=
userDto
.
getFuncPerms
();
funcPerms
.
forEach
(
str
->
{
funcPerms
.
forEach
(
str
->
{
authorities
.
add
(
new
SimpleGrantedAuthority
(
str
));
authorities
.
add
(
new
SimpleGrantedAuthority
(
"ROLE_"
+
str
));
});
});
}
}
...
...
cneeds-server-datashow/src/main/java/com/mx/cneeds/server/datashow/web/device/LogController.java
View file @
dfccfab2
...
@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -43,7 +44,7 @@ public class LogController {
...
@@ -43,7 +44,7 @@ public class LogController {
@Autowired
@Autowired
private
DeviceClient
deviceClient
;
private
DeviceClient
deviceClient
;
@PreAuthorize
(
"hasRole('remotelog:logfile:list') or hasRole('admin')"
)
@PostMapping
(
"/logfile/list"
)
@PostMapping
(
"/logfile/list"
)
public
R
logFileList
(
@RequestParam
(
required
=
false
)
Integer
page
,
public
R
logFileList
(
@RequestParam
(
required
=
false
)
Integer
page
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
@RequestParam
(
required
=
false
)
Integer
pageSize
,
...
@@ -105,6 +106,7 @@ public class LogController {
...
@@ -105,6 +106,7 @@ public class LogController {
return
new
R
().
put
(
"data"
,
pageDto
);
return
new
R
().
put
(
"data"
,
pageDto
);
}
}
@PreAuthorize
(
"hasRole('remotelog:logfile:delete') or hasRole('admin')"
)
@PostMapping
(
"/logfile/delete"
)
@PostMapping
(
"/logfile/delete"
)
public
R
deleteLogFile
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
List
<
Long
>
ids
){
public
R
deleteLogFile
(
@RequestParam
(
value
=
"ids"
,
required
=
false
)
List
<
Long
>
ids
){
logFileClient
.
deleteLogFile
(
ids
);
logFileClient
.
deleteLogFile
(
ids
);
...
@@ -115,6 +117,7 @@ public class LogController {
...
@@ -115,6 +117,7 @@ public class LogController {
* 处理完成日志
* 处理完成日志
* @return
* @return
*/
*/
@PreAuthorize
(
"hasRole('remotelog:logfile:edit') or hasRole('admin')"
)
@PostMapping
(
"/logfile/finish"
)
@PostMapping
(
"/logfile/finish"
)
public
R
finishLog
(
@RequestParam
(
value
=
"logId"
)
Long
logId
){
public
R
finishLog
(
@RequestParam
(
value
=
"logId"
)
Long
logId
){
logFileClient
.
finishLog
(
logId
);
logFileClient
.
finishLog
(
logId
);
...
...
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