add alert/notification functionality (for server connection events and messages)

This commit is contained in:
RaidMax
2022-06-11 11:34:00 -05:00
parent ffb0e5cac1
commit a44b4e9475
16 changed files with 579 additions and 21 deletions

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using Data.Models.Misc;
using Newtonsoft.Json;
using SharedLibraryCore.Configuration.Attributes;
using SharedLibraryCore.Interfaces;
@ -154,6 +155,13 @@ namespace SharedLibraryCore.Configuration
{ Permission.Console.ToString(), new List<string> { "*" } }
};
public Dictionary<string, Permission> MinimumAlertPermissions { get; set; } = new()
{
{ nameof(EFInboxMessage), Permission.Trusted },
{ GameEvent.EventType.ConnectionLost.ToString(), Permission.Administrator },
{ GameEvent.EventType.ConnectionRestored.ToString(), Permission.Administrator }
};
[ConfigurationIgnore]
[LocalizedDisplayName("WEBFRONT_CONFIGURATION_PRESET_BAN_REASONS")]
public Dictionary<string, string> PresetPenaltyReasons { get; set; } = new()