diff options
author | bobzel <zzzman@gmail.com> | 2020-09-19 17:59:00 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-09-19 17:59:00 -0400 |
commit | d4f3dd01976739be98d25d77708856230eb35d3e (patch) | |
tree | 298e29a4b466da9f05da49fd6f690abbb24d9c1c /src/client/views/DocumentDecorations.tsx | |
parent | 743cc8b98549dddd4fe5caaa9740caf95a57d56e (diff) |
changed Add-Only so that if you have Admin rights to a document you can remove it from a read-only or add-only collection
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 9a49093b4..96eba1869 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -580,7 +580,8 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> } const canDelete = SelectionManager.SelectedDocuments().some(docView => { const collectionAcl = docView.props.ContainingCollectionView ? GetEffectiveAcl(docView.props.ContainingCollectionDoc?.[DataSym]) : AclEdit; - return !docView.props.Document._stayInCollection && (collectionAcl === AclAdmin || collectionAcl === AclEdit); + const docAcl = GetEffectiveAcl(docView.props.Document); + return !docView.props.Document._stayInCollection && (collectionAcl === AclAdmin || collectionAcl === AclEdit || docAcl === AclAdmin); }); const canOpen = SelectionManager.SelectedDocuments().some(docView => !docView.props.Document._stayInCollection); const closeIcon = !canDelete ? (null) : ( |