mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 03:20:26 +00:00
fix(team): improve team retrieval and session handling for users
This commit is contained in:
@@ -18,6 +18,9 @@ class DecideWhatToDoWithUser
|
||||
}
|
||||
if (auth()?->user()?->currentTeam()) {
|
||||
refreshSession(auth()->user()->currentTeam());
|
||||
} elseif (auth()?->user()?->teams?->count() > 0) {
|
||||
// User's session team is invalid (e.g., removed from team), switch to first available team
|
||||
refreshSession(auth()->user()->teams->first());
|
||||
}
|
||||
if (! auth()->user() || ! isCloud()) {
|
||||
if (! isCloud() && showBoarding() && ! in_array($request->path(), allowedPathsForBoardingAccounts())) {
|
||||
|
||||
Reference in New Issue
Block a user