opnform-host-nginx/api
Chirag Chhatrala f344764f52
Implement EnsureUserHasWorkspace Trait and Integrate into Controllers… (#741)
* Implement EnsureUserHasWorkspace Trait and Integrate into Controllers and Jobs

- Introduced the EnsureUserHasWorkspace trait to ensure users have at least one workspace when they are detached from a workspace.
- Integrated the trait into WorkspaceUserController to enforce workspace checks during user detachment.
- Updated RemoveWorkspaceGuests job to utilize the new trait for ensuring users have a workspace after detachment.
- Modified UserWorkspace model to call the ensureUserHasWorkspace method upon deletion, maintaining workspace integrity.

These changes enhance user management by ensuring that users always have a workspace, improving overall application stability.

* Add test

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
2025-04-28 18:03:38 +02:00
..
app Implement EnsureUserHasWorkspace Trait and Integrate into Controllers… (#741) 2025-04-28 18:03:38 +02:00
bootstrap Refactor Docker configuration and development setup 2025-01-29 17:19:36 +01:00
config Stripe Payment (#679) 2025-04-10 12:04:25 +02:00
database Partial submissions (#705) 2025-04-28 17:33:55 +02:00
public Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
resources Stripe Payment (#679) 2025-04-10 12:04:25 +02:00
routes Stripe Payment (#679) 2025-04-10 12:04:25 +02:00
storage Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
tests Implement EnsureUserHasWorkspace Trait and Integrate into Controllers… (#741) 2025-04-28 18:03:38 +02:00
.env.docker GH issue template, docker cache fix, remove docker client entrypoint 2024-09-04 11:19:03 +02:00
.env.example Stripe Payment (#679) 2025-04-10 12:04:25 +02:00
.gitignore Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
_ide_helper_models.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
artisan Update Docker Documentation to Address Line Ending Issues for Windows Users 2025-03-21 16:30:59 +01:00
composer.json Stripe Payment (#679) 2025-04-10 12:04:25 +02:00
composer.lock Stripe Payment (#679) 2025-04-10 12:04:25 +02:00
phpunit.xml Email spam security (#641) 2024-12-18 13:16:27 +01:00
pint.json Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
server.php Separated laravel app to its own folder (#540) 2024-08-26 18:24:56 +02:00
vapor.yml Update Vapor deployment configuration 2025-02-15 09:18:27 +00:00