Add auditing

This commit is contained in:
Constantin Graf
2024-09-03 14:07:13 +02:00
committed by Constantin Graf
parent a01e1d6b0b
commit 156d2ff1a0
26 changed files with 732 additions and 16 deletions

View File

@@ -86,7 +86,13 @@ class DeletionService
'currentOrganization',
])
->get();
$organization->users()->sync([]);
$members = Member::query()
->whereBelongsTo($organization, 'organization')
->get();
foreach ($members as $member) {
$member->delete();
}
// Make sure all users have at least one organization and delete placeholders
foreach ($users as $user) {