Search Results for

    Show / Hide Table of Contents
    View Source

    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 Source

    CanPreviewDocument(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

    true when no user-bound preview session is active, or when the preview user may browse the document; otherwise false.

    View Source

    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

    true when no user-bound preview session is active, or when the preview user may browse the element; otherwise false.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX