feat: implement tenant OAuth flow and guest achievements
This commit is contained in:
@@ -27,8 +27,12 @@ class TenantIsolation
|
||||
}
|
||||
|
||||
// Set tenant context for query scoping
|
||||
DB::statement("SET @tenant_id = ?", [$tenantId]);
|
||||
|
||||
$connection = DB::connection();
|
||||
if (in_array($connection->getDriverName(), ['mysql', 'mariadb'])) {
|
||||
$connection->statement('SET @tenant_id = ?', [$tenantId]);
|
||||
}
|
||||
|
||||
|
||||
// Add tenant context to request for easy access in controllers
|
||||
$request->attributes->set('current_tenant_id', $tenantId);
|
||||
|
||||
@@ -58,4 +62,4 @@ class TenantIsolation
|
||||
// 4. For tenant-specific resources, use token tenant_id
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user