• Core
  • Infrastructure
  • Web
  • Extensions
Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IBackOfficeSecurity

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

    Properties

    View Source

    CurrentUser

    Gets the current user.

    Declaration
    IUser CurrentUser { get; }
    Property Value
    Type Description
    IUser

    The current user that has been authenticated for the request.

    Remarks

    If authentication hasn't taken place this will be null.

    Methods

    View Source

    GetUserId()

    Gets the current user's id.

    Declaration
    Attempt<int> GetUserId()
    Returns
    Type Description
    Attempt<System.Int32>

    The current user's Id that has been authenticated for the request.

    Remarks

    If authentication hasn't taken place this will be unsuccessful.

    View Source

    IsAuthenticated()

    Ensures that a back office user is logged in

    Declaration
    bool IsAuthenticated()
    Returns
    Type Description
    System.Boolean
    Remarks

    This does not force authentication, that must be done before calls to this are made.

    View Source

    UserHasSectionAccess(String, IUser)

    Checks if the specified user as access to the app

    Declaration
    bool UserHasSectionAccess(string section, IUser user)
    Parameters
    Type Name Description
    System.String section
    IUser user
    Returns
    Type Description
    System.Boolean
    Remarks

    If authentication hasn't taken place this will be unsuccessful.

    • Improve this Doc
    • View Source
    In This Article
    • Properties
      • CurrentUser
    • Methods
      • GetUserId()
      • IsAuthenticated()
      • UserHasSectionAccess(String, IUser)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX