refactor: rename EnableCoverArtUpload to EnableArtworkUpload

The config flag gates all image uploads (artists, radios, playlists),
not just cover art. Rename it to accurately reflect its scope across
the backend config, native API permission check, Subsonic CoverArtRole,
serve_index JSON key, and frontend config.
This commit is contained in:
Deluan
2026-03-27 19:33:46 -04:00
parent 79e1af7cd6
commit f33ca75378
8 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ const maxImageSize = 10 << 20 // 10MB
func checkImageUploadPermission(w http.ResponseWriter, r *http.Request) bool {
user, _ := request.UserFrom(r.Context())
if !conf.Server.EnableCoverArtUpload && !user.IsAdmin {
http.Error(w, "cover art upload is disabled", http.StatusForbidden)
if !conf.Server.EnableArtworkUpload && !user.IsAdmin {
http.Error(w, "artwork upload is disabled", http.StatusForbidden)
return false
}
return true