refactor: 角色添加是否系统角色字段相关逻辑

This commit is contained in:
2025-03-04 09:46:57 +08:00
parent 4624875852
commit ef9d767c9a
3 changed files with 6 additions and 0 deletions

View File

@@ -227,6 +227,10 @@ class Role
return error('请确认要操作对象是否存在');
}
if (1 == $role->is_system) {
return error('该角色禁止删除');
}
if (!$role->delete()) {
return error('操作失败');
}