feat(server): add EnableCoverArtUpload config option
Allow administrators to disable playlist cover art upload/removal for non-admin users via the new EnableCoverArtUpload config option (default: true). - Guard uploadPlaylistImage and deletePlaylistImage endpoints (403 for non-admin when disabled) - Set CoverArtRole in Subsonic GetUser/GetUsers responses based on config and admin status - Pass config to frontend and conditionally hide upload/remove UI controls - Admins always retain upload capability regardless of setting
This commit is contained in:
@@ -22,6 +22,7 @@ func buildUserResponse(user model.User) responses.User {
|
||||
ScrobblingEnabled: true,
|
||||
DownloadRole: conf.Server.EnableDownloads,
|
||||
ShareRole: conf.Server.EnableSharing,
|
||||
CoverArtRole: conf.Server.EnableCoverArtUpload || user.IsAdmin,
|
||||
Folder: slice.Map(user.Libraries, func(lib model.Library) int32 { return int32(lib.ID) }),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user