Merge remote-tracking branch 'origin/next' into fix/application-branch-validation

This commit is contained in:
Andras Bacsai
2026-06-02 11:10:33 +02:00
17 changed files with 306 additions and 29 deletions
+8 -2
View File
@@ -11,9 +11,15 @@ use Illuminate\Validation\Rule;
function getTeamIdFromToken()
{
$token = auth()->user()->currentAccessToken();
$user = auth()->user();
$token = $user?->currentAccessToken();
$teamId = data_get($token, 'team_id');
return data_get($token, 'team_id');
if (! $user || is_null($teamId) || ! $user->teams()->where('teams.id', $teamId)->exists()) {
return null;
}
return $teamId;
}
function invalidTokenResponse()
{