Class EnumerableSecurity
Inheritance
System.Object
EnumerableSecurity
Namespace: EPiServer.Security
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class EnumerableSecurity : Object
Methods
WhereAuthorized<T>(IEnumerable<T>, IPrincipal)
Filters the source enumeration using each item's security descriptor.
Declaration
public static IEnumerable<T> WhereAuthorized<T>(this IEnumerable<T> source, IPrincipal user)
where T : ISecurable
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | source | The source enumeration. |
System.Security.Principal.IPrincipal | user | The user to filter authorization against. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | Elements which fill the required access level for the given user. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to filter. |
WhereAuthorized<T>(IEnumerable<T>, IPrincipal, AccessLevel)
Filters the source enumeration using each item's security descriptor.
Declaration
public static IEnumerable<T> WhereAuthorized<T>(this IEnumerable<T> source, IPrincipal user, AccessLevel requiredAccess)
where T : ISecurable
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | source | The source enumeration. |
System.Security.Principal.IPrincipal | user | The user to filter authorization against. |
AccessLevel | requiredAccess | The required access level. This is Read by default. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> | Elements which fill the required access level for the given user. |
Type Parameters
Name | Description |
---|---|
T | The type of entity to filter. |