Update api.php

This commit is contained in:
Damodar Lohani 2024-09-04 12:25:51 +05:45 committed by GitHub
parent 107fc1d069
commit 269efbe2f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -278,10 +278,6 @@ App::init()
* Admin User Authentication
*/
elseif (($project->getId() === 'console' && !$team->isEmpty()) || $mode === APP_MODE_ADMIN) {
if ($user->isEmpty()) {
throw new Exception(Exception::USER_UNAUTHORIZED);
}
$teamId = $team->getId();
$adminRoles = [];
$memberships = $user->getAttribute('memberships', []);