mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-17 20:42:25 +03:00
Only allow Admins to login to the UI (for now)
This commit is contained in:
parent
43b0a9dadd
commit
4e8cb5ffef
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user