Interface IUserStartNodeEntitiesService
Namespace: Umbraco.Cms.Api.Management.Services.Entities
Assembly: Umbraco.Cms.Api.Management.dll
Syntax
public interface IUserStartNodeEntitiesService
Methods
View SourceChildUserAccessEntities(IEnumerable<IEntitySlim>, String[])
Calculates the applicable child entities from a list of candidate child entities for users without root access.
Declaration
IEnumerable<UserAccessEntity> ChildUserAccessEntities(IEnumerable<IEntitySlim> candidateChildren, string[] userStartNodePaths)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IEntity |
candidateChildren | The candidate child entities to filter (i.e. entities fetched with |
System. |
userStartNodePaths | The calculated start node paths for the user. |
Returns
Type | Description |
---|---|
IEnumerable<User |
A list of child entities applicable entities for the user. |
Remarks
The returned entities may include entities that outside of the user start node scope, but are needed to for browsing to the actual user start nodes. These entities will be marked as "no access" entities. Some candidate entities may be filtered out if they are not applicable for the user scope.
ChildUserAccessEntities(UmbracoObjectTypes, String[], Guid, Int32, Int32, Ordering, out Int64)
Calculates the applicable child entities for a given object type for users without root access.
Declaration
virtual IEnumerable<UserAccessEntity> ChildUserAccessEntities(UmbracoObjectTypes umbracoObjectType, string[] userStartNodePaths, Guid parentKey, int skip, int take, Ordering ordering, out long totalItems)
Parameters
Type | Name | Description |
---|---|---|
Umbraco |
umbracoObjectType | The object type. |
System. |
userStartNodePaths | The calculated start node paths for the user. |
Guid | parentKey | The key of the parent. |
System. |
skip | The number of applicable children to skip. |
System. |
take | The number of applicable children to take. |
Ordering | ordering | The ordering to apply when fetching and paginating the children. |
System. |
totalItems | The total number of applicable children available. |
Returns
Type | Description |
---|---|
IEnumerable<User |
A list of child entities applicable for the user. |
Remarks
The returned entities may include entities that outside of the user start node scope, but are needed to for browsing to the actual user start nodes. These entities will be marked as "no access" entities.
RootUserAccessEntities(UmbracoObjectTypes, Int32[])
Calculates the applicable root entities for a given object type for users without root access.
Declaration
IEnumerable<UserAccessEntity> RootUserAccessEntities(UmbracoObjectTypes umbracoObjectType, int[] userStartNodeIds)
Parameters
Type | Name | Description |
---|---|---|
Umbraco |
umbracoObjectType | The object type. |
System. |
userStartNodeIds | The calculated start node IDs for the user. |
Returns
Type | Description |
---|---|
IEnumerable<User |
A list of root entities for the user. |
Remarks
The returned entities may include entities that outside of the user start node scope, but are needed to for browsing to the actual user start nodes. These entities will be marked as "no access" entities.
This method does not support pagination, because it must load all entities explicitly in order to calculate the correct result, given that user start nodes can be descendants of root nodes. Consumers need to apply pagination to the result if applicable.
UserAccessEntities(IEnumerable<IEntitySlim>, String[])
Calculates the access level of a collection of entities for users without root access.
Declaration
IEnumerable<UserAccessEntity> UserAccessEntities(IEnumerable<IEntitySlim> entities, string[] userStartNodePaths)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IEntity |
entities | The entities. |
System. |
userStartNodePaths | The calculated start node paths for the user. |
Returns
Type | Description |
---|---|
IEnumerable<User |
The access level for each entity. |