diff options
author | bobzel <zzzman@gmail.com> | 2020-08-12 10:41:02 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-12 10:41:02 -0400 |
commit | e976cf57176b5ba8d758ccfd63d443c291781b4f (patch) | |
tree | 48286ba9ba6b8e1d4df2ece5d2f58944869fbc4c /src/fields/Doc.ts | |
parent | 318a45b6b428a459ade553fef7fd8c26e485eccb (diff) |
changed iconifying (or setting templates on) readonly documents to work by setting the layout on the layout oducment
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 3 |
1 files changed, 2 insertions, 1 deletions
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; |