Interface IPreviewAccessEvaluator
Determines whether the user that the current preview session belongs to may see the unpublished version of a document or element.
Namespace: Umbraco.Cms.Core.Preview
Assembly: Umbraco.Core.dll
Syntax
public interface IPreviewAccessEvaluator
Remarks
The published caches consult this before handing out a draft, and serve the published version of anything that is refused.
Methods
View SourceCanPreviewDocument(IPublishedContent)
Determines whether the unpublished version of the given document may be shown in the current preview session.
Declaration
bool CanPreviewDocument(IPublishedContent content)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishedContent | content | The unpublished version of the document. |
Returns
| Type | Description |
|---|---|
| bool |
|
CanPreviewElement(IPublishedElement)
Determines whether the unpublished version of the given element may be shown in the current preview session.
Declaration
bool CanPreviewElement(IPublishedElement element)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishedElement | element | The unpublished version of the element. |
Returns
| Type | Description |
|---|---|
| bool |
|