mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-22 12:50:48 +02:00
Fixed: Settings fail to save for some auth setups
This commit is contained in:
parent
c46b7c5e4b
commit
a88fc34a78
1 changed files with 4 additions and 2 deletions
|
|
@ -42,8 +42,10 @@ public HostConfigController(IConfigFileProvider configFileProvider,
|
|||
SharedValidator.RuleFor(c => c.UrlBase).ValidUrlBase();
|
||||
SharedValidator.RuleFor(c => c.InstanceName).ContainsProwlarr().When(c => c.InstanceName.IsNotNullOrWhiteSpace());
|
||||
|
||||
SharedValidator.RuleFor(c => c.Username).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
|
||||
SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
|
||||
SharedValidator.RuleFor(c => c.Username).NotEmpty().When(c => c.AuthenticationMethod == AuthenticationType.Basic ||
|
||||
c.AuthenticationMethod == AuthenticationType.Forms);
|
||||
SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod == AuthenticationType.Basic ||
|
||||
c.AuthenticationMethod == AuthenticationType.Forms);
|
||||
|
||||
SharedValidator.RuleFor(c => c.SslPort).ValidPort().When(c => c.EnableSsl);
|
||||
SharedValidator.RuleFor(c => c.SslPort).NotEqual(c => c.Port).When(c => c.EnableSsl);
|
||||
|
|
|
|||
Loading…
Reference in a new issue