Users in locked groups cannot be deleted
Issue Summary
Users who are group members (does not apply to group leaders) in either groups that are locked, or groups that have entered or passed the Lottery phase cannot be destroyed unless two conditions are met. 1) They are removed from the group or 2) The group leader has been destroyed.
It is unclear whether it is the locking of the group or the status of the draw that causes this issue. Regardless, users should be able to be destroyed (removed) under any circumstance by the admin.
Steps to reproduce
- Seed database or run
rails db:drop && rails db:create && ./bin/setup
- Follow procedure to assign rooms to one suite
- Groups with rooms assigned (in the results phase) should be affected. Deleting a non-group-leader should throw a generic error
Edited by Kevin Tang