diff options
author | bobzel <zzzman@gmail.com> | 2023-07-07 15:57:51 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-07-07 15:57:51 -0400 |
commit | cf88809ea2299395db70ce608c193df7f24f0fb2 (patch) | |
tree | 57206a4b1281410a4371c5ae4616d388e1d694b7 /src/fields/Doc.ts | |
parent | 0f0d646e45de42c7f84f6fa316c80d1413f92e5c (diff) |
fixed self-ownership of copied Docs created by someone else. prevent dash from being pasted into itself. fixed inheritance of acls
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 28fbdc192..8be295810 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -751,7 +751,9 @@ export namespace Doc { } }; const docAtKey = doc[key]; - if (docAtKey instanceof Doc) { + if (key === 'author') { + assignKey(Doc.CurrentUserEmail); + } else if (docAtKey instanceof Doc) { if (pruneDocs.includes(docAtKey)) { // prune doc and do nothing } else if (!Doc.IsSystem(docAtKey) && (key.startsWith('layout') || ['embedContainer', 'annotationOn', 'proto'].includes(key) || ((key === 'link_anchor_1' || key === 'link_anchor_2') && doc.author === Doc.CurrentUserEmail))) { |