diff options
author | srichman333 <sarah_n_richman@brown.edu> | 2023-06-15 12:43:58 -0400 |
---|---|---|
committer | srichman333 <sarah_n_richman@brown.edu> | 2023-06-15 12:43:58 -0400 |
commit | e31f6403bc62faea72767f68d3bf34ac8bd28183 (patch) | |
tree | 05802eab3438264c74076b46d1dee91ea697aceb /src/client/util/SharingManager.tsx | |
parent | ef953dc11ebe2735bc4d87e2afa272a2c9ff8f78 (diff) |
acls distribute properly, documentDecorations shows user effective acl
Diffstat (limited to 'src/client/util/SharingManager.tsx')
-rw-r--r-- | src/client/util/SharingManager.tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx index 78e502e6e..01f36bd29 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); |