Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rails] Destroy Users not associated with any Community #952

Open
2 tasks
rudokemper opened this issue Sep 23, 2023 · 0 comments
Open
2 tasks

[Rails] Destroy Users not associated with any Community #952

rudokemper opened this issue Sep 23, 2023 · 0 comments
Labels
Hacktoberfest Hacktoberfest 2023 rails

Comments

@rudokemper
Copy link
Member

Currently, Users may only belong to one Community. When a Community is destroyed, then the Users become orphaned, with an undesirable side effect that their username is not available anymore to any future users.

Let's make it so that when a Community is destroyed, any Users associated with them become destroyed as well.

In the future, we may make it possible that a User can belong to multiple Communities; so, to future-proof ourselves, we could take an approach that if a User belongs to 0 communities, then the User is also destroyed.

Acceptance criteria:

  • If there is a new community called Test community with users test-admin, test-user, test-viewer, then
  • When I as a logged in super admin destroy that community, then all three of these users are destroyed as well (insofar as they then belong to 0 communities).
@rudokemper rudokemper added rails Hacktoberfest Hacktoberfest 2023 labels Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Hacktoberfest 2023 rails
Projects
None yet
Development

No branches or pull requests

1 participant