Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IBackOfficeSecurityAccessor

    Provides access to the IBackOfficeSecurity instance for the current request or ambient async context.

    Namespace: Umbraco.Cms.Core.Security
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IBackOfficeSecurityAccessor

    Properties

    View Source

    BackOfficeSecurity

    Gets the IBackOfficeSecurity instance for the current request or async context.

    Declaration
    IBackOfficeSecurity? BackOfficeSecurity { get; }
    Property Value
    Type Description
    IBackOfficeSecurity

    Methods

    View Source

    Override(IBackOfficeSecurity)

    Sets an ambient IBackOfficeSecurity override for the current async flow. The override takes precedence over the HTTP-context-based resolution for the lifetime of the returned scope. Disposing the scope clears the override.

    Declaration
    IDisposable Override(IBackOfficeSecurity backOfficeSecurity)
    Parameters
    Type Name Description
    IBackOfficeSecurity backOfficeSecurity

    The identity to use for the duration of the scope.

    Returns
    Type Description
    IDisposable

    An System.IDisposable that clears the override when disposed.

    Remarks

    This is intended for background processing scenarios where no HTTP context is available but CMS code still needs a backoffice identity.

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