Skip to content

Commit 28dcd31

Browse files
AC-9924 AC-11581 AC-12392 improve ACL check
1 parent 022e64b commit 28dcd31

File tree

9 files changed

+39
-3
lines changed

9 files changed

+39
-3
lines changed

app/code/Magento/Backend/Controller/Adminhtml/System/Design.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ abstract class Design extends Action
1414
*
1515
* @see _isAllowed()
1616
*/
17-
const ADMIN_RESOURCE = 'Magento_Backend::design';
17+
const ADMIN_RESOURCE = 'Magento_Backend::schedule';
1818

1919
/**
2020
* Core registry

app/code/Magento/Quote/etc/webapi.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<service class="Magento\Quote\Api\CartRepositoryInterface" method="get"/>
1414
<resources>
1515
<resource ref="Magento_Cart::manage" />
16+
<resource ref="Magento_Customer::customer" />
1617
</resources>
1718
</route>
1819
<route url="/V1/carts/search" method="GET">

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Cancel.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
class Cancel extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\View
1010
{
11+
/**
12+
* Authorization level of a basic admin session
13+
*
14+
* @see _isAllowed()
15+
*/
16+
public const ADMIN_RESOURCE = 'Magento_Sales::invoice';
17+
1118
/**
1219
* Cancel invoice action
1320
*

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Capture.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
class Capture extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\View
1010
{
11+
/**
12+
* Authorization level of a basic admin session
13+
*
14+
* @see _isAllowed()
15+
*/
16+
public const ADMIN_RESOURCE = 'Magento_Sales::invoice';
17+
1118
/**
1219
* Capture invoice action
1320
*

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/NewAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class NewAction extends \Magento\Backend\App\Action implements HttpGetActionInte
2323
*
2424
* @see _isAllowed()
2525
*/
26-
const ADMIN_RESOURCE = 'Magento_Sales::sales_invoice';
26+
public const ADMIN_RESOURCE = 'Magento_Sales::invoice';
2727

2828
/**
2929
* @var Registry

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Save extends \Magento\Backend\App\Action implements HttpPostActionInterfac
3030
*
3131
* @see _isAllowed()
3232
*/
33-
public const ADMIN_RESOURCE = 'Magento_Sales::sales_invoice';
33+
public const ADMIN_RESOURCE = 'Magento_Sales::invoice';
3434

3535
/**
3636
* @var InvoiceSender

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/Start.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010

1111
class Start extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\View implements HttpGetActionInterface
1212
{
13+
/**
14+
* Authorization level of a basic admin session
15+
*
16+
* @see _isAllowed()
17+
*/
18+
public const ADMIN_RESOURCE = 'Magento_Sales::invoice';
19+
1320
/**
1421
* Start create invoice action
1522
*

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/UpdateQty.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
*/
2424
class UpdateQty extends AbstractView implements HttpPostActionInterface
2525
{
26+
/**
27+
* Authorization level of a basic admin session
28+
*
29+
* @see _isAllowed()
30+
*/
31+
public const ADMIN_RESOURCE = 'Magento_Sales::invoice';
32+
2633
/**
2734
* @var JsonFactory
2835
*/

app/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/VoidAction.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88

99
class VoidAction extends \Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\View
1010
{
11+
/**
12+
* Authorization level of a basic admin session
13+
*
14+
* @see _isAllowed()
15+
*/
16+
public const ADMIN_RESOURCE = 'Magento_Sales::invoice';
17+
1118
/**
1219
* Void invoice action
1320
*

0 commit comments

Comments
 (0)