Mike Chambers
04/22/2026, 9:05 PMMike Chambers
04/22/2026, 9:08 PMthis.#workspace!.propertyViewGuard.addRule({...}) I have a property hidden for one root node over another based on it's documentType ( ps contentType... why do we still have this naming duality in Umbraco?? )
(it's a coming feature for one branch of the business over another)
https://cdn.discordapp.com/attachments/1496617979620622376/1496618782146429241/visibility-guards.element.ts?ex=69ea8a5b&is=69e938db&hm=4bf0b994134a6136bda0acc984747785f83c80c98e46400150b61144b7a365bd&Mike Chambers
04/22/2026, 9:12 PMimport { UMB_DOCUMENT_WORKSPACE_CONTEXT, type UmbDocumentWorkspaceContext, UmbDocumentItemRepository } from "@umbraco-cms/backoffice/document";
this.#details = new UmbDocumentItemRepository(this);
and not some how consuming UMB_DOCUMENT_ITEM_REPOSITORY_ALIAS
??
like I have done with
import { UMB_ANCESTORS_ENTITY_CONTEXT, type UmbAncestorsEntityContext } from "@umbraco-cms/backoffice/entity";
this.consumeContext(UMB_ANCESTORS_ENTITY_CONTEXT, (context) => {
this.#log("DEBUG: Ancestors Context Captured");
this.#ancestors = context;
this.#checkInitialization();
});Jacob Overgaard
04/23/2026, 7:03 AMUMB_ITEM_REPOSITORY and the system would know where you are and hand you the relevant one - document, media, member, etc.
However, simply new'ing up the repository you need when you need it is all you need. They are backed by singleton stores so you won't store duplicate data in memory or anything like that.