Repo rebuild

This commit is contained in:
Mark Gregory
2026-09-15 12:33:28 +01:00
commit be28c4feec
5629 changed files with 317074 additions and 0 deletions
@@ -0,0 +1,22 @@
<?php
namespace Modules\Platform\app\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;
class EnsureTenantAssigned
{
/**
* Ensure the authenticated user belongs to a company tenant.
*/
public function handle(Request $request, Closure $next): Response
{
$user = $request->user();
abort_if(! $user || ! $user->company_id, 403, 'No company is assigned to this account.');
return $next($request);
}
}