DefaultAuthorizationRequirement.cs 879 B

123456789101112131415161718192021222324
  1. using Microsoft.AspNetCore.Authorization;
  2. namespace Jellyfin.Api.Auth.DefaultAuthorizationPolicy
  3. {
  4. /// <summary>
  5. /// The default authorization requirement.
  6. /// </summary>
  7. public class DefaultAuthorizationRequirement : IAuthorizationRequirement
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="DefaultAuthorizationRequirement"/> class.
  11. /// </summary>
  12. /// <param name="validateParentalSchedule">A value indicating whether to validate parental schedule.</param>
  13. public DefaultAuthorizationRequirement(bool validateParentalSchedule = true)
  14. {
  15. ValidateParentalSchedule = validateParentalSchedule;
  16. }
  17. /// <summary>
  18. /// Gets a value indicating whether to ignore parental schedule.
  19. /// </summary>
  20. public bool ValidateParentalSchedule { get; }
  21. }
  22. }