fix: 角色可分配权限优化
This commit is contained in:
parent
f18a16ddb9
commit
74807cfa96
@ -20,6 +20,7 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Objects;
|
||||
|
||||
@RestController
|
||||
@Tag(name="系统认证接口")
|
||||
@ -146,6 +147,9 @@ public class AuthController {
|
||||
)
|
||||
@PostMapping("/role-menu-add")
|
||||
public ResponseEntity addRoleMenu(@RequestBody SystemRoleMenu srm) {
|
||||
if(Objects.equals(srm.getMenuId(), "") || Objects.equals(srm.getRoleId(), "")){
|
||||
return ResponseEntity.ok(ResponseResult.error("请选择合适的角色和功能"));
|
||||
}
|
||||
return ResponseEntity.ok(authService.addRoleMenu(srm));
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ public class SystemController {
|
||||
|
||||
@Operation(
|
||||
summary = "菜单 加载",
|
||||
description = "加载用户拥有的菜单(用于显示在左侧)",
|
||||
description = "加载用户拥有的菜单(用于显示在左侧,被删除的菜单不会加载)",
|
||||
tags = {"系统相关接口"}
|
||||
)
|
||||
@GetMapping("/menu")
|
||||
@ -31,7 +31,7 @@ public class SystemController {
|
||||
}
|
||||
@Operation(
|
||||
summary = "菜单 加载 全部",
|
||||
description = "加载用户拥有的所有菜单,常常用于管理菜单",
|
||||
description = "加载用户拥有的所有菜单,常常用于管理菜单(被删除的菜单也会加兹安)",
|
||||
tags = {"系统相关接口"}
|
||||
)
|
||||
@GetMapping("/menu-all")
|
||||
|
Loading…
Reference in New Issue
Block a user