mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-19 08:38:50 +01:00
feat(config): add EnableUserAvatarUpload flag
This commit is contained in:
parent
02c9816aec
commit
962910f0de
6 changed files with 15 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ type configOptions struct {
|
|||
EnableStarRating bool
|
||||
EnableUserEditing bool
|
||||
EnableArtworkUpload bool
|
||||
EnableUserAvatarUpload bool
|
||||
MaxImageUploadSize string
|
||||
MaxImageSize string
|
||||
EnableSharing bool
|
||||
|
|
@ -1028,6 +1029,7 @@ func setViperDefaults() {
|
|||
viper.SetDefault("enablenowplaying", true)
|
||||
viper.SetDefault("uiplaybackreportinterval", consts.DefaultUIPlaybackReportInterval)
|
||||
viper.SetDefault("enableartworkupload", true)
|
||||
viper.SetDefault("enableuseravatarupload", true)
|
||||
viper.SetDefault("maximageuploadsize", consts.DefaultMaxImageUploadSize)
|
||||
viper.SetDefault("maximagesize", consts.DefaultMaxImageSize)
|
||||
viper.SetDefault("enablesharing", true)
|
||||
|
|
|
|||
|
|
@ -76,6 +76,13 @@ var _ = Describe("Configuration", func() {
|
|||
})
|
||||
})
|
||||
|
||||
Describe("user avatar upload", func() {
|
||||
It("is enabled by default", func() {
|
||||
conf.Load(true)
|
||||
Expect(conf.Server.EnableUserAvatarUpload).To(BeTrue())
|
||||
})
|
||||
})
|
||||
|
||||
Describe("ValidateURL", func() {
|
||||
It("accepts a valid http URL", func() {
|
||||
fn := conf.ValidateURL("TestOption", "http://example.com/path")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue