aboutsummaryrefslogtreecommitdiff
path: root/src/fields/util.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-07-05 20:29:38 -0400
committerbobzel <zzzman@gmail.com>2023-07-05 20:29:38 -0400
commit53fe9a1e2503d8112ddb2f2101f46d5a2e23c791 (patch)
treebca71c0c3c2762de2749814c5256968f65fb5bbc /src/fields/util.ts
parent5a9af979cc293d0e3843270ee053c24bf0eb6ef5 (diff)
from last
Diffstat (limited to 'src/fields/util.ts')
-rw-r--r--src/fields/util.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fields/util.ts b/src/fields/util.ts
index 48de36efe..fc0057827 100644
--- a/src/fields/util.ts
+++ b/src/fields/util.ts
@@ -256,12 +256,10 @@ function getEffectiveLayoutAcl(target: any, user?: string): symbol {
if (effectiveAcl) {
return DocServer?.Control?.isReadOnly?.() && HierarchyMapping.get(effectiveAcl)!.level < aclLevel.editable ? AclEdit : effectiveAcl;
- } else {
- return GetEffectiveAcl(Doc.GetProto(target['embedContainer']), user);
}
}
// authored documents are private until an ACL is set.
- const targetAuthor = target.__fieldTuples?.author || target.author; // target may be a Doc of Proxy, so check __fieldTuples.author and .author
+ const targetAuthor = target.__fieldTuples?.author || target.author; // target may be a Doc or Proxy, so check __fieldTuples.author and .author
if (targetAuthor && targetAuthor !== userChecked) return AclPrivate;
return AclAdmin;
}