mirror of
https://github.com/tiennm99/coolify.git
synced 2026-06-22 11:34:36 +00:00
Merge remote-tracking branch 'origin/next' into fix/application-branch-validation
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user