* Initial stab at how this could look * Authorization PoC wip * Add connection manager * Add DI to its own class * Use enum instead of string * Use groups * Refactor group management into its own service * Update a users groups when it's saved * Add saved events * Wire up deleted notifications * Ensure update date and create date is the same * Cleanup * Minor cleanup * Remove unusued usings * Move route to constant * Add docstrings to server event router * Fix and suppress warnings * Refactor to authorizer pattern * Update EventType * Remove unused enums * Add trashed events * Notify current user that they've been updated * Add broadcast We don't need it, but seems like a thing that a server event router should be able to do. * Add ServerEventRouterTests * Add ServerEventUserManagerTests * Use TimeProvider * Remove principal null check * Don't assign event type * Minor cleanup * Rename AuthorizedEventSources * Change permission for relations * Exctract event authorization into its own service * Add some tests * Update name * Add forgotten file * Rmember to add to DI
66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
namespace Umbraco.Cms.Core;
|
|
|
|
public static partial class Constants
|
|
{
|
|
public static class ServerEvents
|
|
{
|
|
public static class EventSource
|
|
{
|
|
public const string Document = "Umbraco:CMS:Document";
|
|
|
|
public const string DocumentType = "Umbraco:CMS:DocumentType";
|
|
|
|
public const string Media = "Umbraco:CMS:Media";
|
|
|
|
public const string MediaType = "Umbraco:CMS:MediaType";
|
|
|
|
public const string Member = "Umbraco:CMS:Member";
|
|
|
|
public const string MemberType = "Umbraco:CMS:MemberType";
|
|
|
|
public const string MemberGroup = "Umbraco:CMS:MemberGroup";
|
|
|
|
public const string DataType = "Umbraco:CMS:DataType";
|
|
|
|
public const string Language = "Umbraco:CMS:Language";
|
|
|
|
public const string Script = "Umbraco:CMS:Script";
|
|
|
|
public const string Stylesheet = "Umbraco:CMS:Stylesheet";
|
|
|
|
public const string Template = "Umbraco:CMS:Template";
|
|
|
|
public const string DictionaryItem = "Umbraco:CMS:DictionaryItem";
|
|
|
|
public const string Domain = "Umbraco:CMS:Domain";
|
|
|
|
public const string PartialView = "Umbraco:CMS:PartialView";
|
|
|
|
public const string PublicAccessEntry = "Umbraco:CMS:PublicAccessEntry";
|
|
|
|
public const string Relation = "Umbraco:CMS:Relation";
|
|
|
|
public const string RelationType = "Umbraco:CMS:RelationType";
|
|
|
|
public const string UserGroup = "Umbraco:CMS:UserGroup";
|
|
|
|
public const string User = "Umbraco:CMS:User";
|
|
|
|
public const string CurrentUser = "Umbraco:CMS:CurrentUser";
|
|
|
|
public const string Webhook = "Umbraco:CMS:Webhook";
|
|
}
|
|
|
|
public static class EventType
|
|
{
|
|
public static string Created = "Created";
|
|
|
|
public static string Updated = "Updated";
|
|
|
|
public static string Deleted = "Deleted";
|
|
|
|
public static string Trashed = "Trashed";
|
|
}
|
|
}
|
|
}
|