diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysRoleController.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysRoleController.java index a474ed30..3a9418b2 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysRoleController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/controller/system/SysRoleController.java @@ -79,6 +79,7 @@ public class SysRoleController extends BaseController { @Log(title = "角色管理", businessType = BusinessType.INSERT) @PostMapping public R add(@Validated @RequestBody SysRoleBo role) { + roleService.checkRoleAllowed(role); if (!roleService.checkRoleNameUnique(role)) { return R.fail("新增角色'" + role.getRoleName() + "'失败,角色名称已存在"); } else if (!roleService.checkRoleKeyUnique(role)) {