Aias00 opened a new issue, #6621: URL: https://github.com/apache/shenyu/issues/6621
- severity: High - files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/RoleServiceImpl.java:126-133` - description: `delete` only calls `roleMapper.delete(ids)`. It never removes `permission` rows whose `object_id` is the deleted role id (`permission.deleteByObjectIds` exists but is unused here) nor `user_role` rows whose `role_id` is deleted. Additionally, `role.selectById` filters `role_name != 'super'` but `selectByIds` (used at line 128) and `delete` do NOT, so the service can delete the `super` role. - impact: Orphaned `permission` and `user_role` rows persist after role deletion, corrupting the permission graph; ability to delete the super role breaks admin access entirely. - suggested_fix: In `RoleServiceImpl.delete`, reject ids whose role_name is 'super' (mirror `selectById`'s guard), then call `permissionMapper.deleteByObjectIds(ids)` and `userRoleMapper` delete-by-role-id before `roleMapper.delete`. Wrap in `@Transactional`. - confidence: High - related_existing: none. --- _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
