Only display bulk actions for tracked changes when permitted (#18038)

GitOrigin-RevId: a2f4df9c26866aab3eea62c92ce6e1a211e08294
This commit is contained in:
Alf Eaton 2024-04-22 13:47:09 +01:00 committed by Copybot
parent 315b511666
commit 92d6966f69
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ function CurrentFileContainer() {
return <AddCommentEntry key={id} />
}
if (entry.type === 'bulk-actions') {
if (entry.type === 'bulk-actions' && permissions.write) {
return (
<BulkActionsEntry
key={id}

View file

@ -89,7 +89,7 @@ function EditorWidgets() {
>
<div className="rp-in-editor-widgets-inner">
{wantTrackChanges && <ToggleWidget />}
{nChanges > 1 && (
{nChanges > 1 && permissions.write && (
<>
<BulkActions.Button onClick={handleShowBulkAcceptDialog}>
<Icon type="check" /> {t('accept_all')} ({nChanges})