Deleting a group does not remove roleassigments from the roleassigment table
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 564
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 29
Description
Because we store roleassignments as text (since it can be for a user or a group or even a system assignment), there is no foreign key between roleassignment table and user or group. We have known about users and have added code to mitigate around this, but we can currently delete a group and leave orphaned role assignments.
Steps to reproduce:
- Create a group.
- Assign a role to that group.
- Delete the group.
- Check db, note that roleassigment row still exists.
This should have no to minimal impact on the system (if you reuse an alias for a group, it could automatically pick up these assignments), but is an important clean up task, nonetheless.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by creating a group, assigning it a role, deleting the group, and checking the database for the remaining role assignment. Trace the group-deletion flow and the existing cleanup code for user role assignments. Done means deleting a group removes its orphaned role-assignment row without affecting other assignments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authorization, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100