X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/291779a4a9998e89dfada3c6b9d69db050dfe016..3c6b99f269e502e31ee14b1ae9060de334012c82:/projects/stargazer/users_impl.cpp

diff --git a/projects/stargazer/users_impl.cpp b/projects/stargazer/users_impl.cpp
index 7b110431..6b87b5a9 100644
--- a/projects/stargazer/users_impl.cpp
+++ b/projects/stargazer/users_impl.cpp
@@ -280,9 +280,6 @@ if (FindByNameNonLock(login, &iter))
     return false;
     }
 
-if (iter->Authorize(ip, enabledDirs, auth))
-    return false;
-
 if (FindByIPIdx(ip, iter))
     {
     if (iter->GetLogin() != login)
@@ -292,9 +289,14 @@ if (FindByIPIdx(ip, iter))
                      iter->GetLogin().c_str());
         return false;
         }
+    if (iter->Authorize(ip, enabledDirs, auth))
+        return false;
     return true;
     }
 
+if (iter->Authorize(ip, enabledDirs, auth))
+    return false;
+
 AddToIPIdx(iter);
 return true;
 }