Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
d7c54d24
Commit
d7c54d24
authored
Jul 27, 2017
by
naan1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
放开超级管理员的数据权限限制
parent
9fb7ef08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
src/main/java/com/stylefeng/guns/modular/system/controller/UserMgrController.java
+11
-3
No files found.
src/main/java/com/stylefeng/guns/modular/system/controller/UserMgrController.java
View file @
d7c54d24
...
...
@@ -162,9 +162,14 @@ public class UserMgrController extends BaseController {
@Permission
@ResponseBody
public
Object
list
(
@RequestParam
(
required
=
false
)
String
name
,
@RequestParam
(
required
=
false
)
String
beginTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestParam
(
required
=
false
)
Integer
deptid
)
{
DataScope
dataScope
=
new
DataScope
(
ShiroKit
.
getDeptDataScope
());
List
<
Map
<
String
,
Object
>>
users
=
managerDao
.
selectUsers
(
dataScope
,
name
,
beginTime
,
endTime
,
deptid
);
return
new
UserWarpper
(
users
).
warp
();
if
(
ShiroKit
.
isAdmin
()){
List
<
Map
<
String
,
Object
>>
users
=
managerDao
.
selectUsers
(
null
,
name
,
beginTime
,
endTime
,
deptid
);
return
new
UserWarpper
(
users
).
warp
();
}
else
{
DataScope
dataScope
=
new
DataScope
(
ShiroKit
.
getDeptDataScope
());
List
<
Map
<
String
,
Object
>>
users
=
managerDao
.
selectUsers
(
dataScope
,
name
,
beginTime
,
endTime
,
deptid
);
return
new
UserWarpper
(
users
).
warp
();
}
}
/**
...
...
@@ -350,6 +355,9 @@ public class UserMgrController extends BaseController {
* 判断当前登录的用户是否有操作这个用户的权限
*/
private
void
assertAuth
(
Integer
userId
)
{
if
(
ShiroKit
.
isAdmin
()){
return
;
}
List
<
Integer
>
deptDataScope
=
ShiroKit
.
getDeptDataScope
();
User
user
=
this
.
userMapper
.
selectById
(
userId
);
Integer
deptid
=
user
.
getDeptid
();
...
...
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