You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
|
|
|
|
namespace Jellyfin.Api.Auth.DefaultAuthorizationPolicy
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The default authorization requirement.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class DefaultAuthorizationRequirement : IAuthorizationRequirement
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Initializes a new instance of the <see cref="DefaultAuthorizationRequirement"/> class.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="validateParentalSchedule">A value indicating whether to validate parental schedule.</param>
|
|
|
|
|
public DefaultAuthorizationRequirement(bool validateParentalSchedule = true)
|
|
|
|
|
{
|
|
|
|
|
ValidateParentalSchedule = validateParentalSchedule;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets a value indicating whether to ignore parental schedule.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool ValidateParentalSchedule { get; init; }
|
|
|
|
|
}
|
|
|
|
|
}
|