@umbraco-cms/backoffice
    Preparing search index...

    This base provides the necessary for a class to become a context-api controller.

    Hierarchy (View Summary)

    Index
    allowedSections: Observable<string[] | undefined> = ...
    avatarUrls: Observable<string[] | undefined> = ...
    currentUser: Observable<UmbCurrentUserModel> = ...
    documentStartNodeUniques: Observable<UmbReferenceByUnique[] | undefined> = ...
    email: Observable<string | undefined> = ...
    fallbackPermissions: Observable<string[] | undefined> = ...
    hasAccessToAllLanguages: Observable<boolean | undefined> = ...
    hasAccessToSensitiveData: Observable<boolean | undefined> = ...
    hasDocumentRootAccess: Observable<boolean | undefined> = ...
    hasMediaRootAccess: Observable<boolean | undefined> = ...
    isAdmin: Observable<boolean | undefined> = ...
    languageIsoCode: Observable<string | undefined> = ...
    languages: Observable<string[] | undefined> = ...
    mediaStartNodeUniques: Observable<UmbReferenceByUnique[] | undefined> = ...
    name: Observable<string | undefined> = ...
    permissions: Observable<unknown[] | undefined> = ...
    unique: Observable<string | undefined> = ...
    userName: Observable<string | undefined> = ...
    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Invalidates the loaded current user, so that the next call to load fetches it from the server again. Call this when the loaded user can no longer be trusted, e.g. when authorization is lost — a subsequent sign-in may be for a different user.

      Returns void

      The #currentUser state is deliberately NOT cleared here. The backoffice stays mounted behind the login overlay during a session timeout, and several consumers observe the unfiltered observable parts (e.g. recycle-bin conditions, sensitive-data property gating, language read-only checks) without guarding against undefined — clearing would tear down or read-only-flip open workspaces mid-edit for the common case of the same user signing back in. Consumers of the filtered currentUser observable hold their last value until the fresh user has been fetched and then re-evaluate.

    • Checks if a user is the current user.

      Parameters

      • userUnique: string

        The user id to check

      Returns Promise<boolean>

      True if the user is the current user, otherwise false

    • Loads the current user. Concurrent callers share the same in-flight promise, so awaiting load() always waits for #currentUser to be populated.

      Returns Promise<void>

      Resolves once the current user observable has emitted.

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void