Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
b1edabf5
Commit
b1edabf5
authored
Mar 30, 2018
by
Junling Bu
Browse files
超级管理员不能删除和修改,防止演示平台的管理员密码被修改造成不能登录。
parent
f095dd02
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminController.java
View file @
b1edabf5
...
...
@@ -89,6 +89,12 @@ public class AdminController {
if
(
adminId
==
null
){
return
ResponseUtil
.
unlogin
();
}
Integer
anotherAdminId
=
admin
.
getId
();
if
(
anotherAdminId
.
intValue
()
==
1
){
return
ResponseUtil
.
fail
(
403
,
"超级管理员不能修改"
);
}
adminService
.
updateById
(
admin
);
return
ResponseUtil
.
ok
(
admin
);
}
...
...
@@ -101,7 +107,7 @@ public class AdminController {
Integer
anotherAdminId
=
admin
.
getId
();
if
(
anotherAdminId
.
intValue
()
==
1
){
return
ResponseUtil
.
fail
(
403
,
"超级
用户
不能删除"
);
return
ResponseUtil
.
fail
(
403
,
"超级
管理员
不能删除"
);
}
adminService
.
deleteById
(
anotherAdminId
);
return
ResponseUtil
.
ok
();
...
...
Write
Preview
Supports
Markdown
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