mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-29 18:14:38 -05:00
Split V5 dashboard behavior into domain controllers and policies, add agent token rotation/revocation, status reconciliation jobs, ingress firewall syncing, and canvas connection APIs. Add migrations for V5 status tracking, server capabilities, resource connection aliases, and revoked agent tokens.
23 lines
528 B
PHP
23 lines
528 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\V5\Concerns;
|
|
|
|
use App\Models\Team;
|
|
use Illuminate\Http\Request;
|
|
|
|
trait ResolvesCurrentTeam
|
|
{
|
|
/**
|
|
* Resolve the current team set by the EnsureCurrentTeam middleware, or
|
|
* abort with a 404 so resources outside the team stay invisible.
|
|
*/
|
|
protected function currentTeamOrFail(Request $request): Team
|
|
{
|
|
$currentTeam = $request->attributes->get('v5.currentTeam');
|
|
|
|
abort_unless($currentTeam instanceof Team, 404);
|
|
|
|
return $currentTeam;
|
|
}
|
|
}
|