mirror of
https://github.com/navidrome/navidrome.git
synced 2026-06-02 07:01:36 +00:00
fix(scanner): check user ID instead of IsAdmin for playlist import guard
The condition `!u.IsAdmin && u.ID == ""` was wrong — with the synthetic admin fallback (IsAdmin: true, ID: ""), it evaluated to false and allowed playlist import with an empty OwnerID. The check should be just `u.ID == ""` to skip whenever there's no real user.
This commit is contained in:
parent
5b01636d33
commit
fec03d8780
@ -50,7 +50,7 @@ func (p *phasePlaylists) produce(put func(entry *model.Folder)) error {
|
||||
return nil
|
||||
}
|
||||
u, _ := request.UserFrom(p.ctx)
|
||||
if !u.IsAdmin && u.ID == "" {
|
||||
if u.ID == "" {
|
||||
log.Warn(p.ctx, "Playlists will not be imported, as there are no admin users yet, "+
|
||||
"Please create an admin user first, and then update the playlists for them to be imported")
|
||||
return nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user