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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user