π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[server] fix admin whitelisting Fixed a logic typo which meant the fallback for first user_id being admin would no-op.
Charliec24aea2fc2e0
diff --git a/server/pkg/middleware/auth.go b/server/pkg/middleware/auth.goindex 8e1d373e17..2f1bd2d0a8 100644--- a/server/pkg/middleware/auth.go+++ b/server/pkg/middleware/auth.go@@ -114,7 +114,7 @@ func (m *AuthMiddleware) AdminAuthMiddleware() gin.HandlerFunc {// if no admins are set, then check if the user is first user in the systemif len(admins) == 0 && admin == 0 {id, err := m.UserAuthRepo.GetMinUserID()- if err != nil && id == userID {+ if err == nil && id == userID {c.Next()return}