Class EnumerableSecurity
Inheritance
System.Object
EnumerableSecurity
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Security
Assembly: EPiServer.dll
Version: 10.10.4Syntax
public static class EnumerableSecurity
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. |