From e976cf57176b5ba8d758ccfd63d443c291781b4f Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 12 Aug 2020 10:41:02 -0400 Subject: changed iconifying (or setting templates on) readonly documents to work by setting the layout on the layout oducment --- src/fields/Doc.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/fields/Doc.ts') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index b535fea5a..00ffe399e 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -806,7 +806,8 @@ export namespace Doc { target[targetKey] = new PrefetchProxy(templateDoc); } else { titleTarget && (Doc.GetProto(target).title = titleTarget); - Doc.GetProto(target)[targetKey] = new PrefetchProxy(templateDoc); + const setDoc = [AclAdmin, AclEdit].includes(GetEffectiveAcl(Doc.GetProto(target))) ? Doc.GetProto(target) : target; + setDoc[targetKey] = new PrefetchProxy(templateDoc); } } return target; -- cgit v1.2.3-70-g09d2