-
-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove obsolete ACL resources from DB (#3272)
- Loading branch information
1 parent
7ffebf7
commit 748bcc0
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/code/core/Mage/Oauth/sql/oauth_setup/upgrade-1.0.0.0-1.0.0.1.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* OpenMage | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available at https://opensource.org/license/osl-3-0-php | ||
* | ||
* @category Mage | ||
* @package Mage_Admin | ||
* @copyright Copyright (c) 2006-2020 Magento, Inc. (https://www.magento.com) | ||
* @copyright Copyright (c) 2022 The OpenMage Contributors (https://www.openmage.org) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** @var Mage_Core_Model_Resource_Setup $installer */ | ||
$installer = $this; | ||
$installer->startSetup(); | ||
|
||
$obsoleteAcl = [ | ||
'admin/system/api/consumer', | ||
'admin/system/api/consumer/edit', | ||
'admin/system/api/consumer/delete', | ||
'admin/system/api/authorizedTokens' | ||
]; | ||
|
||
$installer->getConnection()->delete( | ||
$installer->getTable('admin/rule'), | ||
['resource_id IN (?)' => $obsoleteAcl] | ||
); | ||
|
||
$installer->endSetup(); |