aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SharingManager.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-06-15 12:54:10 -0400
committerbobzel <zzzman@gmail.com>2023-06-15 12:54:10 -0400
commitc4436c837a38d666bc0ff332e224b819fbd3c729 (patch)
tree9795452dc856c7c06bcd8756ea2fcefbf9b3481f /src/client/util/SharingManager.tsx
parent3899a3cb58965eb71582c9cb5cdc31d27ec91e72 (diff)
parent40579c8b3cf0504ac10e966e640af58e8876acd3 (diff)
Merge branch 'collaboration-sarah' of https://github.com/brown-dash/Dash-Web into collaboration-sarah
Diffstat (limited to 'src/client/util/SharingManager.tsx')
-rw-r--r--src/client/util/SharingManager.tsx13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx
index bea870f21..a51a71268 100644
--- a/src/client/util/SharingManager.tsx
+++ b/src/client/util/SharingManager.tsx
@@ -159,13 +159,14 @@ export class SharingManager extends React.Component<{}> {
const myAcl = `acl-${Doc.CurrentUserEmailNormalized}`;
const isDashboard = DocListCast(Doc.MyDashboards.data).indexOf(target) !== -1;
- // setting the same acl for a docs within the doc being shared
- if (this.overridePrivate) {
- var childDocs = DocListCast(target.data);
- childDocs.map(doc => {
+ // setting the same acl for a docs within the doc being shared if they haven't been set yet
+ // or if the 'Override Private' checkbox is selected
+ var childDocs = DocListCast(target.data);
+ childDocs.map(doc => {
+ if (this.overridePrivate || doc[acl]==undefined){
this.setInternalSharing(recipient, permission, doc);
- });
- }
+ }
+ });
const docs = SelectionManager.Views().length < 2 ? [target] : SelectionManager.Views().map(docView => docView.props.Document);