|
@@ -7,6 +7,7 @@ using System.Net.Sockets;
|
|
|
using System.Reflection;
|
|
|
using Emby.Server.Implementations;
|
|
|
using Jellyfin.Api.Auth;
|
|
|
+using Jellyfin.Api.Auth.AnonymousLanAccessPolicy;
|
|
|
using Jellyfin.Api.Auth.DefaultAuthorizationPolicy;
|
|
|
using Jellyfin.Api.Auth.DownloadPolicy;
|
|
|
using Jellyfin.Api.Auth.FirstTimeOrIgnoreParentalControlSetupPolicy;
|
|
@@ -61,6 +62,7 @@ namespace Jellyfin.Server.Extensions
|
|
|
serviceCollection.AddSingleton<IAuthorizationHandler, IgnoreParentalControlHandler>();
|
|
|
serviceCollection.AddSingleton<IAuthorizationHandler, FirstTimeOrIgnoreParentalControlSetupHandler>();
|
|
|
serviceCollection.AddSingleton<IAuthorizationHandler, LocalAccessHandler>();
|
|
|
+ serviceCollection.AddSingleton<IAuthorizationHandler, AnonymousLanAccessHandler>();
|
|
|
serviceCollection.AddSingleton<IAuthorizationHandler, LocalAccessOrRequiresElevationHandler>();
|
|
|
serviceCollection.AddSingleton<IAuthorizationHandler, RequiresElevationHandler>();
|
|
|
serviceCollection.AddSingleton<IAuthorizationHandler, SyncPlayAccessHandler>();
|
|
@@ -157,6 +159,13 @@ namespace Jellyfin.Server.Extensions
|
|
|
policy.AddAuthenticationSchemes(AuthenticationSchemes.CustomAuthentication);
|
|
|
policy.AddRequirements(new SyncPlayAccessRequirement(SyncPlayAccessRequirementType.IsInGroup));
|
|
|
});
|
|
|
+ options.AddPolicy(
|
|
|
+ Policies.AnonymousLanAccessPolicy,
|
|
|
+ policy =>
|
|
|
+ {
|
|
|
+ policy.AddAuthenticationSchemes(AuthenticationSchemes.CustomAuthentication);
|
|
|
+ policy.AddRequirements(new AnonymousLanAccessRequirement());
|
|
|
+ });
|
|
|
});
|
|
|
}
|
|
|
|