Revert "支持角色父子继承,允许子角色单独调整自己有的权限"

This reverts commit 64806dc4
This commit is contained in:
陈博文
2025-06-22 16:16:43 +08:00
parent 036dcb9c31
commit ff493a66b2
16 changed files with 32 additions and 296 deletions

View File

@@ -6,7 +6,6 @@ import cn.iocoder.yudao.framework.common.exception.ErrorCode;
* System 错误码枚举类
*
* system 系统,使用 1-002-000-000 段
* @author chenbowen
*/
public interface ErrorCodeConstants {
@@ -34,8 +33,6 @@ public interface ErrorCodeConstants {
ErrorCode ROLE_CAN_NOT_UPDATE_SYSTEM_TYPE_ROLE = new ErrorCode(1_002_002_003, "不能操作类型为系统内置的角色");
ErrorCode ROLE_IS_DISABLE = new ErrorCode(1_002_002_004, "名字为【{}】的角色已被禁用");
ErrorCode ROLE_ADMIN_CODE_ERROR = new ErrorCode(1_002_002_005, "标识【{}】不能使用");
ErrorCode ROLE_CAN_NOT_DELETE_HAS_CHILDREN = new ErrorCode(1_002_002_006, " 角色【{}】存在子角色,不允许删除");
ErrorCode ROLE_PARENT_IS_CHILD = new ErrorCode(1_002_002_007, "不能设置自己的子角色为父角色");
// ========== 用户模块 1-002-003-000 ==========
ErrorCode USER_USERNAME_EXISTS = new ErrorCode(1_002_003_000, "用户账号已经存在");

View File

@@ -5,22 +5,16 @@ import lombok.Getter;
/**
* 登录结果的枚举类
* @author chenbowen
*/
@Getter
@AllArgsConstructor
public enum LoginResultEnum {
// 成功
SUCCESS(0),
// 账号或密码不正确
BAD_CREDENTIALS(10),
// 用户被禁用
USER_DISABLED(20),
// 图片验证码不存在
CAPTCHA_NOT_FOUND(30),
// 图片验证码不正确
CAPTCHA_CODE_ERROR(31),
SUCCESS(0), // 成功
BAD_CREDENTIALS(10), // 账号或密码不正确
USER_DISABLED(20), // 用户被禁用
CAPTCHA_NOT_FOUND(30), // 图片验证码不存在
CAPTCHA_CODE_ERROR(31), // 图片验证码不正确
;

View File

@@ -3,10 +3,6 @@ package cn.iocoder.yudao.module.system.enums.permission;
import lombok.AllArgsConstructor;
import lombok.Getter;
/**
* @author chenbowen
*/
@Getter
@AllArgsConstructor
public enum RoleTypeEnum {
@@ -15,14 +11,10 @@ public enum RoleTypeEnum {
* 内置角色
*/
SYSTEM(1),
/**
* 标准角色
*/
NORMAL(2),
/**
* 自定义角色
*/
CUSTOM(3);
CUSTOM(2);
private final Integer type;