aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocComponent.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-07-11 15:32:08 -0400
committerbobzel <zzzman@gmail.com>2023-07-11 15:32:08 -0400
commit06cfe3cbba127d865e788b00561f8a591af1bd81 (patch)
tree2aeb0132d33e04c90483a46a3482ab3d8c4744d8 /src/client/views/DocComponent.tsx
parent8a852df1c918d8e31ba0b540798895fcd420cca7 (diff)
more fixes to simplify sharing
Diffstat (limited to 'src/client/views/DocComponent.tsx')
-rw-r--r--src/client/views/DocComponent.tsx15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/client/views/DocComponent.tsx b/src/client/views/DocComponent.tsx
index 10985c3f1..a41fc8ded 100644
--- a/src/client/views/DocComponent.tsx
+++ b/src/client/views/DocComponent.tsx
@@ -190,23 +190,12 @@ export function ViewBoxAnnotatableComponent<P extends ViewBoxAnnotatableProps>()
}
const added = docs;
if (added.length) {
- Object.keys(Doc.GetProto(this.rootDoc)[DocAcl]) // apply all collection acls (except pseudo-acl 'Me') to each added doc
- .filter(key => key !== 'acl-Me')
- .forEach(key =>
- added.forEach(d => {
- const permissionString = StrCast(Doc.GetProto(this.props.Document)[key]);
- const permissionSymbol = ReverseHierarchyMap.get(permissionString)?.acl;
- const permission = permissionSymbol && HierarchyMapping.get(permissionSymbol)?.name;
- distributeAcls(key, permission ?? SharingPermissions.Augment, d, undefined, false);
- })
- );
-
if ([AclAugment, AclEdit, AclAdmin].includes(effectiveAcl)) {
- added.map(doc => {
+ added.forEach(doc => {
doc._dragOnlyWithinContainer = undefined;
if (annotationKey ?? this._annotationKeySuffix()) Doc.GetProto(doc).annotationOn = this.rootDoc;
Doc.SetContainer(doc, this.rootDoc);
- inheritParentAcls(targetDataDoc, doc);
+ inheritParentAcls(targetDataDoc, doc, true);
});
const annoDocs = targetDataDoc[annotationKey ?? this.annotationKey] as List<Doc>;