opnform-host-nginx/api/app/Http
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
..
Controllers Implement EnsureUserHasWorkspace Trait and Integrate into Controllers… (#741) 2025-04-28 18:03:38 +02:00
Middleware Refactor Docker configuration and development setup 2025-01-29 17:19:36 +01:00
Requests Partial submissions (#705) 2025-04-28 17:33:55 +02:00
Resources Partial submissions (#705) 2025-04-28 17:33:55 +02:00
Kernel.php Refactor Docker configuration and development setup 2025-01-29 17:19:36 +01:00