Class ContentAccessEvaluatorExtensions
Convenience methods for the IContentAccessEvaluator interface
Inheritance
System.Object
ContentAccessEvaluatorExtensions
Namespace: EPiServer.Security.Internal
Assembly: EPiServer.dll
Version: 12.0.3Syntax
public static class ContentAccessEvaluatorExtensions : Object
Methods
GetAccessLevel(IContentAccessEvaluator, IContent)
Retrieves the access level of the current user to the IContent instance.
Declaration
public static AccessLevel GetAccessLevel(this IContentAccessEvaluator evaluator, IContent content)
Parameters
Type | Name | Description |
---|---|---|
IContentAccessEvaluator | evaluator | |
IContent | content |
Returns
Type | Description |
---|---|
AccessLevel |
HasAccess(IContentAccessEvaluator, IContent, AccessLevel)
Evaluates if the current user has the requested access rights to the provided IContent instance.
Declaration
public static bool HasAccess(this IContentAccessEvaluator evaluator, IContent content, AccessLevel access)
Parameters
Type | Name | Description |
---|---|---|
IContentAccessEvaluator | evaluator | |
IContent | content | |
AccessLevel | access |
Returns
Type | Description |
---|---|
System.Boolean |
|