Interface IServerEventAccessFilter
Filters the recipients of a server event for a specific event source, based on whether a user may access what the event concerns. This is the broadcast-time counterpart to IEventSourceAuthorizer, which authorizes access to a whole event source at connect time.
Namespace: Umbraco.Cms.Core.ServerEvents
Assembly: Umbraco.Core.dll
Syntax
public interface IServerEventAccessFilter
Remarks
The built-in filters gate entity-scoped sources (document and media) by the recipient's start-node access to the entity's tree path, but a filter may base its decision on anything available from the user or the routing context.
Properties
View SourceFilteredEventSources
Gets the event sources this filter applies to.
Declaration
IEnumerable<string> FilteredEventSources { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<string> |
Methods
View SourceHasAccessAsync(IUser, ServerEventRoutingContext)
Determines whether the user may receive an event described by the given routing context.
Declaration
Task<bool> HasAccessAsync(IUser user, ServerEventRoutingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IUser | user | The user to check. |
| ServerEventRoutingContext | context | The routing context describing what the event concerns (for example the entity's tree path). |
Returns
| Type | Description |
|---|---|
| Task<bool> |
|