diff options
| author | bobzel <zzzman@gmail.com> | 2020-08-06 19:58:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-06 19:58:52 -0400 |
| commit | 318f2bab4f086ce626fc3f1d099d1a09e245f95d (patch) | |
| tree | 85ec890c68b240506e4255c8549a7f4586886c0b /src/client/views/DocumentDecorations.tsx | |
| parent | 6d8dfee38bd39b95396cbc97405516693116b58f (diff) | |
| parent | 3e4329b81d96f139f38eeb182afcbd8359dcd171 (diff) | |
Merge pull request #501 from browngraphicslab/acls_uv
For more testing
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 005df6fe0..f1169763e 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -611,7 +611,11 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> if (SnappingManager.GetIsDragging() || bounds.r - bounds.x < 2 || bounds.x === Number.MAX_VALUE || !seldoc || this._hidden || isNaN(bounds.r) || isNaN(bounds.b) || isNaN(bounds.x) || isNaN(bounds.y)) { return (null); } - const canDelete = SelectionManager.SelectedDocuments().map(docView => GetEffectiveAcl(docView.props.ContainingCollectionDoc)).some(permission => permission === AclAdmin || permission === AclEdit); + const canDelete = SelectionManager.SelectedDocuments().some(docView => { + const docAcl = GetEffectiveAcl(docView.props.Document); + const collectionAcl = GetEffectiveAcl(docView.props.ContainingCollectionDoc); + return [docAcl, collectionAcl].some(acl => [AclAdmin, AclEdit].includes(acl)); + }); const minimal = bounds.r - bounds.x < 100 ? true : false; const maximizeIcon = minimal ? ( <Tooltip title={<><div className="dash-tooltip">Show context menu</div></>} placement="top"> |
