Skip to content

Commit

Permalink
Fix ACL Resource "admin/sales/order/actions/use" not found (#4199)
Browse files Browse the repository at this point in the history
The observer just get's triggered from admin area, so we use some existing ACL rule which seems to be introduced exactly for this case.
  • Loading branch information
pbaldauf authored Sep 17, 2024
1 parent 22c15d7 commit ccb1f6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/core/Mage/Sales/Model/Observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public function restrictAdminBillingAgreementUsage($observer)
if (!($methodInstance instanceof Mage_Sales_Model_Payment_Method_Billing_AgreementAbstract)) {
return;
}
if (!Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/use')) {
if (!Mage::getSingleton('admin/session')->isAllowed('sales/billing_agreement/actions/use')) {
$observer->getEvent()->getResult()->isAvailable = false;
}
}
Expand Down

0 comments on commit ccb1f6c

Please sign in to comment.