Update api.php

This commit is contained in:
Damodar Lohani
2024-09-04 12:28:52 +05:45
committed by GitHub
parent 269efbe2f0
commit a89cf443aa
+1 -1
View File
@@ -277,7 +277,7 @@ App::init()
/**
* Admin User Authentication
*/
elseif (($project->getId() === 'console' && !$team->isEmpty()) || $mode === APP_MODE_ADMIN) {
elseif (($project->getId() === 'console' && !$team->isEmpty() && !$user->isEmpty) || (!$user->empty() && $mode === APP_MODE_ADMIN)) {
$teamId = $team->getId();
$adminRoles = [];
$memberships = $user->getAttribute('memberships', []);