From ccd82fe17dae56b2a3eaf0999d07687edb878c39 Mon Sep 17 00:00:00 2001 From: srichman333 Date: Fri, 14 Jul 2023 10:42:51 -0400 Subject: override nested -> upgrade nested and a few small ui things --- src/client/util/SharingManager.tsx | 10 +++++----- src/client/views/DocumentDecorations.tsx | 4 ++-- src/client/views/PropertiesView.tsx | 13 +++++-------- 3 files changed, 12 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx index 8e5ae7bc0..b20e48c61 100644 --- a/src/client/util/SharingManager.tsx +++ b/src/client/util/SharingManager.tsx @@ -80,7 +80,7 @@ export class SharingManager extends React.Component<{}> { @observable private showUserOptions: boolean = false; // whether to show individuals as options when sharing (in the react-select component) @observable private showGroupOptions: boolean = false; // // whether to show groups as options when sharing (in the react-select component) private populating: boolean = false; // whether the list of users is populating or not - @observable private overrideNested: boolean = false; // whether child docs in a collection/dashboard should be changed to be less private - initially selected so default is override + @observable private upgradeNested: boolean = false; // whether child docs in a collection/dashboard should be changed to be less private - initially selected so default is upgrade all @observable private layoutDocAcls: boolean = false; // whether the layout doc or data doc's acls are to be used @observable private myDocAcls: boolean = false; // whether the My Docs checkbox is selected or not @observable private _buttonDown = false; @@ -97,7 +97,7 @@ export class SharingManager extends React.Component<{}> { DictationOverlay.Instance.hasActiveModal = true; this.isOpen = this.targetDoc !== undefined; this.permissions = SharingPermissions.Augment; - this.overrideNested = true; + this.upgradeNested = true; }); }; @@ -162,7 +162,7 @@ export class SharingManager extends React.Component<{}> { const acl = `acl-${normalizeEmail(user.email)}`; const docs = SelectionManager.Views().length < 2 ? [target] : SelectionManager.Views().map(docView => docView.rootDoc); docs.map(doc => (this.layoutDocAcls || doc.dockingConfig ? doc : Doc.GetProto(doc))).forEach(doc => { - distributeAcls(acl, permission as SharingPermissions, doc, undefined, this.overrideNested ? true : undefined); + distributeAcls(acl, permission as SharingPermissions, doc, undefined, this.upgradeNested ? true : undefined); if (permission !== SharingPermissions.None) { Doc.AddDocToList(sharingDoc, doc.dockingConfig ? dashStorage : storage, doc); } else GetEffectiveAcl(doc, user.email) === AclPrivate && Doc.RemoveDocFromList(sharingDoc, ((doc.createdFrom as Doc) || doc).dockingConfig ? dashStorage : storage, (doc.createdFrom as Doc) || doc); @@ -180,7 +180,7 @@ export class SharingManager extends React.Component<{}> { const docs = SelectionManager.Views().length < 2 ? [target] : SelectionManager.Views().map(docView => docView.rootDoc); docs.map(doc => (this.layoutDocAcls || doc.dockingConfig ? doc : Doc.GetProto(doc))).forEach(doc => { - distributeAcls(acl, permission as SharingPermissions, doc, undefined, this.overrideNested ? true : undefined); + distributeAcls(acl, permission as SharingPermissions, doc, undefined, this.upgradeNested ? true : undefined); if (group instanceof Doc) { Doc.AddDocToList(group, 'docsShared', doc); @@ -607,7 +607,7 @@ export class SharingManager extends React.Component<{}> {
{Doc.noviceMode ? null : (
- (this.overrideNested = !this.overrideNested))} checked={this.overrideNested} /> + (this.upgradeNested = !this.upgradeNested))} checked={this.upgradeNested} /> (this.layoutDocAcls = !this.layoutDocAcls))} checked={this.layoutDocAcls} />
)} diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 3522830e5..bab07ac96 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -831,7 +831,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P   {shareSymbolIcon + ' ' + shareMode}   - {!Doc.noviceMode ? ( + {/* {!Doc.noviceMode ? (
(this.showLayoutAcl = !this.showLayoutAcl))} /> @@ -839,7 +839,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
Layout
) : null} -   +   */}
) : ( diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 2e10bf346..d88d86e1a 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -490,23 +490,20 @@ export class PropertiesView extends React.Component { return (
-
+
+

Individual Users with Access to this Document +
{
{individualTableEntries}
}
{groupTableEntries.length > 0 ? (
- {' '} -

Groups with Access to this Document{' '} +

Groups with Access to this Document
{
{groupTableEntries}
}
) : null} - Guest +

Guest
{this.colorACLDropDown('Guest', true, publicPermission!, true)}
-
- {' '} -

Individual Users with Access to this Document{' '} -
); } -- cgit v1.2.3-70-g09d2