Skip to content

Commit 951ff65

Browse files
author
Mastiuhin Olexandr
committed
MAGETWO-99591: Restricted admin cannot edit reviews from pending reviews grid
1 parent 8912d07 commit 951ff65

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

app/code/Magento/Review/Controller/Adminhtml/Product/Delete.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,10 @@ protected function _isAllowed()
6464

6565
if ($this->getModel()->getStatusId() != Review::STATUS_PENDING) {
6666
$this->messageManager->addErrorMessage(
67-
__('Sorry, You have not permission to do this. The Review is not in Pending status.')
67+
__(
68+
'You don’t have permission to perform this operation.'
69+
. ' The selected review must be in Pending Status.'
70+
)
6871
);
6972

7073
return false;

app/code/Magento/Review/Controller/Adminhtml/Product/Edit.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ protected function _isAllowed()
5151

5252
if ($this->getModel()->getStatusId() != Review::STATUS_PENDING) {
5353
$this->messageManager->addErrorMessage(
54-
__('Sorry, You have not permission to do this. The Review is not in Pending status.')
54+
__(
55+
'You don’t have permission to perform this operation.'
56+
. ' The selected review must be in Pending Status.'
57+
)
5558
);
5659

5760
return false;

app/code/Magento/Review/Controller/Adminhtml/Product/MassDelete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ protected function _isAllowed()
9797
if ($model->getStatusId() != Review::STATUS_PENDING) {
9898
$this->messageManager->addErrorMessage(
9999
__(
100-
'Sorry, You have not permission to do this.'
101-
. ' One or more of the reviews are not in Pending Status.'
100+
'You don’t have permission to perform this operation.'
101+
. ' Selected reviews must be in Pending Status only.'
102102
)
103103
);
104104

app/code/Magento/Review/Controller/Adminhtml/Product/MassUpdateStatus.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ protected function _isAllowed()
101101
if ($model->getStatusId() != Review::STATUS_PENDING) {
102102
$this->messageManager->addErrorMessage(
103103
__(
104-
'Sorry, You have not permission to do this. '
105-
. 'One or more of the reviews are not in Pending Status.'
104+
'You don’t have permission to perform this operation. '
105+
. 'Selected reviews must be in Pending Status only.'
106106
)
107107
);
108108

app/code/Magento/Review/Controller/Adminhtml/Product/Save.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,10 @@ protected function _isAllowed()
115115

116116
if ($this->getModel()->getStatusId() != Review::STATUS_PENDING) {
117117
$this->messageManager->addErrorMessage(
118-
__('Sorry, You have not permission to do this. The Review is not in Pending status.')
118+
__(
119+
'You don’t have permission to perform this operation.'
120+
. ' The selected review must be in Pending Status.'
121+
)
119122
);
120123

121124
return false;

0 commit comments

Comments
 (0)