Skip to content

Commit

Permalink
Fix admin ACL mismatch for OAuth (#3272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz-Silpion committed May 19, 2023
1 parent 8321377 commit 7ffebf7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,6 @@ protected function _isAllowed()
{
/** @var Mage_Admin_Model_Session $session */
$session = Mage::getSingleton('admin/session');
return $session->isAllowed('system/acl/admin_token');
return $session->isAllowed('system/api/oauth_admin_token');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected function _isAllowed()
{
/** @var Mage_Admin_Model_Session $session */
$session = Mage::getSingleton('admin/session');
return $session->isAllowed('system/oauth/authorizedTokens');
return $session->isAllowed('system/api/oauth_authorized_tokens');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ protected function _isAllowed()
}
/** @var Mage_Admin_Model_Session $session */
$session = Mage::getSingleton('admin/session');
return $session->isAllowed('system/oauth/consumer' . $action);
return $session->isAllowed('system/api/oauth_consumer' . $action);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions app/code/core/Mage/Oauth/etc/adminhtml.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<children>
<api>
<children>
<consumer translate="title" module="oauth">
<oauth_consumer translate="title" module="oauth">
<title>OAuth Consumers</title>
<sort_order>20</sort_order>
<children>
Expand All @@ -36,11 +36,11 @@
<sort_order>40</sort_order>
</delete>
</children>
</consumer>
<authorizedTokens translate="title" module="oauth">
</oauth_consumer>
<oauth_authorized_tokens translate="title" module="oauth">
<title>OAuth Authorized Tokens</title>
<sort_order>30</sort_order>
</authorizedTokens>
</oauth_authorized_tokens>
<oauth_admin_token translate="title" module="oauth">
<title>OAuth Admin My Apps</title>
<sort_order>40</sort_order>
Expand Down

0 comments on commit 7ffebf7

Please sign in to comment.