diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-12 21:47:39 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-08-12 21:47:39 +0530 |
| commit | c01cb1dcda454a80555d2ae041800ef3bd261d81 (patch) | |
| tree | 48a2e6eacd31f0c1562a75bc6aa2f1b54f7b1c4e /src/client/views/DocumentDecorations.tsx | |
| parent | 12f3a34f253c2d70ead3fa9d7260df2d8cd0c2cd (diff) | |
used datadoc for acl calculations in many places + some other changes
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index cfe76f361..596c5931b 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -607,9 +607,8 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> return (null); } 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 collectionAcl = GetEffectiveAcl(docView.props.ContainingCollectionDoc?.[DataSym]); + return collectionAcl === AclAdmin || collectionAcl === AclEdit; }); const minimal = bounds.r - bounds.x < 100 ? true : false; const maximizeIcon = minimal ? ( |
