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

Detach users on role/permission physical deletion #2370

Merged
merged 1 commit into from
Mar 22, 2023

Conversation

erikn69
Copy link
Contributor

@erikn69 erikn69 commented Mar 22, 2023

On #2366 I found that if you have users attached to roles/permissions, when forceDelete one role/permission, users are not detached before delete, if we don't have cascade delete it breaks functionality

I don't know if there is a reason for this behavior or is it a bug that has gone unnoticed for years(I've never had to delete one)
This PR fix it and add tests for that

@drbyte drbyte merged commit f7582f8 into spatie:main Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants