Add moderation cases log page

This commit is contained in:
jvyden 2022-06-10 21:21:27 -04:00
parent b51561e943
commit 6c6a7f01f9
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278
14 changed files with 181 additions and 10 deletions

View file

@ -28,4 +28,36 @@ public enum CaseType
HashModeration = 14,
IpAddressBan = 15,
}
public static class CaseTypeExtensions
{
public static bool AffectsUser(this CaseType type)
{
return type switch
{
CaseType.UserSilence => true,
CaseType.UserRestriction => true,
CaseType.UserBan => true,
CaseType.UserDeletion => true,
CaseType.UserCommentsDisabled => true,
CaseType.UserDetailsEdited => true,
CaseType.UserEarthDeletion => true,
_ => false,
};
}
public static bool AffectsLevel(this CaseType type)
{
return type switch
{
CaseType.LevelDeletion => true,
CaseType.LevelLock => true,
CaseType.LevelCommentsDisabled => true,
CaseType.LevelDetailsEdited => true,
CaseType.LevelTeamPickAdded => true,
CaseType.LevelTeamPickRemoved => true,
_ => false,
};
}
}