优化了权限设置拦截

This commit is contained in:
zhangyuheng 2024-07-01 21:08:46 +08:00
parent 9a36ddbc06
commit 9b94a2c5a6
2 changed files with 0 additions and 8 deletions

View File

@ -82,10 +82,6 @@ public class GroupController {
if (flag.equals("admin")) { if (flag.equals("admin")) {
group = group.setAdmin(value); group = group.setAdmin(value);
} else { } else {
if (group.getAdmin()) {
operator.setResponse(FAIL.addMessage("管理员拥有所有权限,无需单独设置权限"));
return;
}
Flag f = Flag.getFlag(flag); Flag f = Flag.getFlag(flag);
if (f == null) { if (f == null) {
operator.setResponse(FAIL.addMessage("未知的权限 %s", flag)); operator.setResponse(FAIL.addMessage("未知的权限 %s", flag));

View File

@ -76,10 +76,6 @@ public class MemberController {
if (flag.equals("admin")) { if (flag.equals("admin")) {
privilege.setAdmin(value); privilege.setAdmin(value);
} else { } else {
if (privilege.getAdmin()) {
operator.setResponse(FAIL.addMessage("管理员拥有所有权限,无需单独设置权限"));
return;
}
Flag f = Flag.getFlag(flag); Flag f = Flag.getFlag(flag);
if (f == null) { if (f == null) {
operator.setResponse(FAIL.addMessage("未知的领地权限 %s", flag)); operator.setResponse(FAIL.addMessage("未知的领地权限 %s", flag));