af1152b001
Refactored all C# test files to use explicit namespace declarations and moved all using directives inside the namespace block for consistency. Updated assembly info and cache files to reflect the new build. Adjusted MvcTestingAppManifest.json to use fully qualified assembly names. No functional changes; all updates are related to code style, organization, and project metadata.
37 lines
1.3 KiB
C#
37 lines
1.3 KiB
C#
// <copyright file="DisableLegacyAuthorization.cs" company="PlaceholderCompany">
|
|
// Copyright (c) PlaceholderCompany. All rights reserved.
|
|
// </copyright>
|
|
|
|
namespace Jellyfin.Server.Migrations.Routines;
|
|
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using MediaBrowser.Controller.Configuration;
|
|
|
|
/// <summary>
|
|
/// Migration to disable legacy authorization in the system config.
|
|
/// </summary>
|
|
[JellyfinMigration("2025-11-18T16:00:00", nameof(DisableLegacyAuthorization))]
|
|
public class DisableLegacyAuthorization : IAsyncMigrationRoutine
|
|
{
|
|
private readonly IServerConfigurationManager _serverConfigurationManager;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="DisableLegacyAuthorization"/> class.
|
|
/// </summary>
|
|
/// <param name="serverConfigurationManager">Instance of the <see cref="IServerConfigurationManager"/> interface.</param>
|
|
public DisableLegacyAuthorization(IServerConfigurationManager serverConfigurationManager)
|
|
{
|
|
_serverConfigurationManager = serverConfigurationManager;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public Task PerformAsync(CancellationToken cancellationToken)
|
|
{
|
|
_serverConfigurationManager.Configuration.EnableLegacyAuthorization = false;
|
|
_serverConfigurationManager.SaveConfiguration();
|
|
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|