implement custom tag (descriptor) feature

allow override of level names through configuration
few small fixes/improvements
This commit is contained in:
RaidMax
2021-01-24 11:47:19 -06:00
parent c419d80b57
commit c4f19e94ef
40 changed files with 5576 additions and 184 deletions

View File

@ -152,6 +152,16 @@ namespace SharedLibraryCore.Database.Models
return e;
}
public void Tell(IEnumerable<string> messages)
{
foreach(var message in messages)
{
#pragma warning disable 4014
Tell(message).WaitAsync();
#pragma warning restore 4014
}
}
/// <summary>
/// warn a client with given reason
/// </summary>
@ -706,10 +716,16 @@ namespace SharedLibraryCore.Database.Models
public ClientPermission ClientPermission => new ClientPermission()
{
Level = Level,
Name = Utilities.CurrentLocalization
.LocalizationIndex[$"GLOBAL_PERMISSION_{Level.ToString().ToUpper()}"]
Name = Level.ToLocalizedLevelName()
};
[NotMapped]
public string Tag
{
get => GetAdditionalProperty<string>(EFMeta.ClientTag);
set => SetAdditionalProperty(EFMeta.ClientTag, value);
}
[NotMapped]
private readonly SemaphoreSlim _processingEvent;