finish support with otane

This commit is contained in:
xiaomlove
2022-03-20 22:14:00 +08:00
parent a5ea51de55
commit 0e4544459f
39 changed files with 427 additions and 104 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ class AuthenticateRepository extends BaseRepository
if (!$user || md5($user->secret . $password . $user->secret) != $user->passhash) {
throw new \InvalidArgumentException('Username or password invalid.');
}
if (IS_PLATFORM_ADMIN && !$user->canAccessAdmin()) {
if (nexus()->isPlatformAdmin() && !$user->canAccessAdmin()) {
throw new UnauthorizedException('Unauthorized!');
}
$user->checkIsNormal();