mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-24 09:08:19 -04:00
Only allow Admins to login to the UI (for now)
This commit is contained in:
1 parent
43b0a9dadd
commit
4e8cb5ffef
1 file changed
+4
@@ -72,6 +72,10 @@ func validateLogin(userRepo model.UserRepository, userName, password string) (*m
|
||||
if u.Password != password {
|
||||
return nil, nil
|
||||
}
|
||||
if !u.IsAdmin {
|
||||
log.Warn("Non-admin user tried to login", "user", userName)
|
||||
return nil, nil
|
||||
}
|
||||
err = userRepo.UpdateLastLoginAt(u.ID)
|
||||
if err != nil {
|
||||
log.Error("Could not update LastLoginAt", "user", userName)
|
||||
|
||||
Reference in new issue
Block a user