mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Cleaned up auth settings
This commit is contained in:
parent
e046d2c680
commit
0c5827fb41
11 changed files with 112 additions and 105 deletions
|
@ -1,7 +1,6 @@
|
|||
using Nancy;
|
||||
using Nancy.Authentication.Basic;
|
||||
using Nancy.Bootstrapper;
|
||||
using NzbDrone.Common.Model;
|
||||
|
||||
namespace NzbDrone.Api.Authentication
|
||||
{
|
||||
|
@ -28,7 +27,7 @@ namespace NzbDrone.Api.Authentication
|
|||
private Response RequiresAuthentication(NancyContext context)
|
||||
{
|
||||
Response response = null;
|
||||
if (context.CurrentUser == null && _authenticationService.AuthenticationType != AuthenticationType.Anonymous)
|
||||
if (context.CurrentUser == null && _authenticationService.Enabled)
|
||||
{
|
||||
response = new Response { StatusCode = HttpStatusCode.Unauthorized };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue