User account deletion with sole-owner guard#88
Merged
Conversation
Overrides Devise registrations#destroy to block deletion when the user is the sole owner of any project, returning 422 with a list of blocking projects. Adds dependent: :destroy to User#project_members so membership records are cleaned up on successful deletion.
…ore file filename collision Bumps addressable (2.8.9 -> 2.9.0, CVE-2026-35611), net-imap (0.6.3 -> 0.6.4, CVE-2026-42245/42246/42256/42257/42258), and view_component (4.5.0 -> 4.10.0, CVE-2026-44836/44837). All are transitive dependencies. Appends a loop index to Faker::Book.title in the dummy_data_generator rake task so filenames within a collection are always distinct — prevents a flaky collision that surfaced with the updated RNG sequence.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
registrations#destroyby overriding it inUsers::RegistrationsControllerdependent: :destroytoUser#project_membersso membership records are cleaned up on successful deletionspec/requests/users_spec.rb: unauthenticated redirect, clean deletion, membership cleanup, sole-owner block, and co-owner pass-through (18 examples, 0 failures)Test plan
DELETE /users— account is deleted and session clearedProjectMemberrecords for the deleted user are removed