IQSS / IQSS/dataverse

Deleting a group does not remove roleassigments from the roleassigment table

Open
#7,879 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type: Bug
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:

  1. Create a group.
  2. Assign a role to that group.
  3. Delete the group.
  4. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.