mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2024-12-20 22:29:47 +08:00
优化了权限设置拦截
This commit is contained in:
parent
9a36ddbc06
commit
9b94a2c5a6
@ -82,10 +82,6 @@ public class GroupController {
|
||||
if (flag.equals("admin")) {
|
||||
group = group.setAdmin(value);
|
||||
} else {
|
||||
if (group.getAdmin()) {
|
||||
operator.setResponse(FAIL.addMessage("管理员拥有所有权限,无需单独设置权限"));
|
||||
return;
|
||||
}
|
||||
Flag f = Flag.getFlag(flag);
|
||||
if (f == null) {
|
||||
operator.setResponse(FAIL.addMessage("未知的权限 %s", flag));
|
||||
|
@ -76,10 +76,6 @@ public class MemberController {
|
||||
if (flag.equals("admin")) {
|
||||
privilege.setAdmin(value);
|
||||
} else {
|
||||
if (privilege.getAdmin()) {
|
||||
operator.setResponse(FAIL.addMessage("管理员拥有所有权限,无需单独设置权限"));
|
||||
return;
|
||||
}
|
||||
Flag f = Flag.getFlag(flag);
|
||||
if (f == null) {
|
||||
operator.setResponse(FAIL.addMessage("未知的领地权限 %s", flag));
|
||||
|
Loading…
Reference in New Issue
Block a user