diff options
author | bobzel <zzzman@gmail.com> | 2020-09-22 09:09:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-22 09:09:01 -0400 |
commit | 3555ad2de2d60079e013bc900573228044205847 (patch) | |
tree | 7d5e7ea75d80f62bd154682ffb7a9f9479b91721 /src | |
parent | 02029b5cad1c27e65630a63cd4d2b632ed6973cd (diff) | |
parent | 3c24520a4bd34c50569605ad199f82e544810d11 (diff) |
Merge pull request #783 from browngraphicslab/acls_uv
Minor changes
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/SharingManager.tsx | 2 | ||||
-rw-r--r-- | src/client/views/collections/CollectionLinearView.tsx | 4 | ||||
-rw-r--r-- | src/client/views/nodes/FilterBox.scss | 1 | ||||
-rw-r--r-- | src/fields/util.ts | 5 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx index d3500970d..713a27581 100644 --- a/src/client/util/SharingManager.tsx +++ b/src/client/util/SharingManager.tsx @@ -88,7 +88,7 @@ export class SharingManager extends React.Component<{}> { this.targetDoc = target_doc || target?.props.Document; DictationOverlay.Instance.hasActiveModal = true; this.isOpen = this.targetDoc !== undefined; - this.permissions = SharingPermissions.Edit; + this.permissions = SharingPermissions.View; }); } diff --git a/src/client/views/collections/CollectionLinearView.tsx b/src/client/views/collections/CollectionLinearView.tsx index 6d7ce629b..ae9915331 100644 --- a/src/client/views/collections/CollectionLinearView.tsx +++ b/src/client/views/collections/CollectionLinearView.tsx @@ -112,7 +112,7 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { const backgroundColor = StrCast(this.props.Document.backgroundColor, "black"); const color = StrCast(this.props.Document.color, "white"); - const menuOpener = <label htmlFor={`${guid}`} style={{ pointerEvents: "all", cursor: "default", background: backgroundColor === color ? "black" : backgroundColor, }} + const menuOpener = <label htmlFor={`${guid}`} style={{ pointerEvents: "all", cursor: "pointer", background: backgroundColor === color ? "black" : backgroundColor, }} onPointerDown={e => e.stopPropagation()} > <p>{BoolCast(this.props.Document.linearViewIsExpanded) ? "–" : "+"}</p> </label>; @@ -123,7 +123,7 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) { {menuOpener} </Tooltip> <input id={`${guid}`} type="checkbox" checked={BoolCast(this.props.Document.linearViewIsExpanded)} ref={this.addMenuToggle} - onChange={action((e: any) => this.props.Document.linearViewIsExpanded = this.addMenuToggle.current!.checked)} /> + onChange={action(() => this.props.Document.linearViewIsExpanded = this.addMenuToggle.current!.checked)} /> <div className="collectionLinearView-content" style={{ height: this.dimension(), flexDirection: flexDir }}> {this.childLayoutPairs.map((pair, ind) => { diff --git a/src/client/views/nodes/FilterBox.scss b/src/client/views/nodes/FilterBox.scss index b39793f01..d32cc0d2b 100644 --- a/src/client/views/nodes/FilterBox.scss +++ b/src/client/views/nodes/FilterBox.scss @@ -33,6 +33,7 @@ .filterBox-addFacetButton { display: flex; margin: auto; + cursor: pointer; .filterBox-span { margin-right: 15px; diff --git a/src/fields/util.ts b/src/fields/util.ts index 2ff966e7e..fe3eea69d 100644 --- a/src/fields/util.ts +++ b/src/fields/util.ts @@ -165,11 +165,10 @@ export function GetEffectiveAcl(target: any, in_prop?: string | symbol | number, // if the current user is the author of the document / the current user is a member of the admin group const userChecked = user || Doc.CurrentUserEmail; if (userChecked === (target.__fields?.author || target.author)) return AclAdmin; + if (currentUserGroups.includes("Admin")) return AclAdmin; if (target[AclSym] && Object.keys(target[AclSym]).length) { - if (currentUserGroups.includes("Admin")) return AclAdmin; - // if the acl is being overriden or the property being modified is one of the playground fields (which can be freely modified) if (_overrideAcl || (in_prop && DocServer.PlaygroundFields?.includes(in_prop.toString()))) return AclEdit; @@ -235,7 +234,7 @@ export function distributeAcls(key: string, acl: SharingPermissions, target: Doc // maps over the aliases of the document const links = DocListCast(dataDoc.links); - links.forEach(alias => distributeAcls(key, acl, alias, inheritingFromCollection, visited)); + links.forEach(link => distributeAcls(key, acl, link, inheritingFromCollection, visited)); // maps over the children of the document DocListCast(dataDoc[Doc.LayoutFieldKey(dataDoc)]).map(d => { |