Kavita/API/Entities/Enums/AgeRating.cs
Joe Milazzo 442af965c6
Restricted Profiles (#1581)
* Added ReadingList age rating from all series and started on some unit tests for the new flows.

* Wrote more unit tests for Reading Lists

* Added ability to restrict user accounts to a given age rating via admin edit user modal and invite user. This commit contains all basic code, but no query modifications.

* When updating a reading list's title via UI, explicitly check if there is an existing RL with the same title.

* Refactored Reading List calculation to work properly in the flows it's invoked from.

* Cleaned up an unused method

* Promoted Collections no longer show tags where a Series exists within them that is above the user's age rating.

* Collection search now respects age restrictions

* Series Detail page now checks if the user has explicit access (as a user might bypass with direct url access)

* Hooked up age restriction for dashboard activity streams.

* Refactored some methods from Series Controller and Library Controller to a new Search Controller to keep things organized

* Updated Search to respect age restrictions

* Refactored all the Age Restriction queries to extensions

* Related Series no longer show up if they are out of the age restriction

* Fixed a bad mapping for the update age restriction api

* Fixed a UI state change after updating age restriction

* Fixed unit test

* Added a migration for reading lists

* Code cleanup
2022-10-10 10:59:20 -07:00

50 lines
1.2 KiB
C#

using System.ComponentModel;
namespace API.Entities.Enums;
/// <summary>
/// Represents Age Rating for content.
/// </summary>
/// <remarks>Based on ComicInfo.xml v2.1 https://github.com/anansi-project/comicinfo/blob/main/drafts/v2.1/ComicInfo.xsd</remarks>
public enum AgeRating
{
/// <summary>
/// This is for Age Restriction for Restricted Profiles
/// </summary>
[Description("Not Applicable")]
NotApplicable = -1,
[Description("Unknown")]
Unknown = 0,
[Description("Rating Pending")]
RatingPending = 1,
[Description("Early Childhood")]
EarlyChildhood = 2,
[Description("Everyone")]
Everyone = 3,
[Description("G")]
G = 4,
[Description("Everyone 10+")]
Everyone10Plus = 5,
[Description("PG")]
// ReSharper disable once InconsistentNaming
PG = 6,
[Description("Kids to Adults")]
KidsToAdults = 7,
[Description("Teen")]
Teen = 8,
[Description("MA15+")]
Mature15Plus = 9,
[Description("Mature 17+")]
Mature17Plus = 10,
[Description("M")]
Mature = 11,
[Description("R18+")]
R18Plus = 12,
[Description("Adults Only 18+")]
AdultsOnly = 13,
[Description("X18+")]
X18Plus = 14
}