File tree Expand file tree Collapse file tree 7 files changed +53
-9
lines changed
controllers/Adminhtml/Oauth Expand file tree Collapse file tree 7 files changed +53
-9
lines changed Original file line number Diff line number Diff line change 1391
1391
"contributions" : [
1392
1392
" code"
1393
1393
]
1394
- }
1394
+ },
1395
+ {
1396
+ "login" : " Tomasz-Silpion" ,
1397
+ "name" : " Tomasz Gregorczyk" ,
1398
+ "avatar_url" : " https://avatars.githubusercontent.com/u/5328659?v=4" ,
1399
+ "profile" : " https://github.com/Tomasz-Silpion" ,
1400
+ "contributions" : [
1401
+ " code"
1402
+ ]
1403
+ },
1395
1404
],
1396
1405
"contributorsPerLine" : 7
1397
1406
}
Original file line number Diff line number Diff line change @@ -155,6 +155,6 @@ protected function _isAllowed()
155
155
{
156
156
/** @var Mage_Admin_Model_Session $session */
157
157
$ session = Mage::getSingleton ('admin/session ' );
158
- return $ session ->isAllowed ('system/acl/admin_token ' );
158
+ return $ session ->isAllowed ('system/api/oauth_admin_token ' );
159
159
}
160
160
}
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ protected function _isAllowed()
149
149
{
150
150
/** @var Mage_Admin_Model_Session $session */
151
151
$ session = Mage::getSingleton ('admin/session ' );
152
- return $ session ->isAllowed ('system/oauth/authorizedTokens ' );
152
+ return $ session ->isAllowed ('system/api/oauth_authorized_tokens ' );
153
153
}
154
154
155
155
/**
Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ protected function _isAllowed()
240
240
}
241
241
/** @var Mage_Admin_Model_Session $session */
242
242
$ session = Mage::getSingleton ('admin/session ' );
243
- return $ session ->isAllowed ('system/oauth/consumer ' . $ action );
243
+ return $ session ->isAllowed ('system/api/oauth_consumer ' . $ action );
244
244
}
245
245
246
246
/**
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * OpenMage
4
+ *
5
+ * This source file is subject to the Open Software License (OSL 3.0)
6
+ * that is bundled with this package in the file LICENSE.txt.
7
+ * It is also available at https://opensource.org/license/osl-3-0-php
8
+ *
9
+ * @category Mage
10
+ * @package Mage_Admin
11
+ * @copyright Copyright (c) 2023 The OpenMage Contributors (https://www.openmage.org)
12
+ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
13
+ */
14
+
15
+ /** @var Mage_Core_Model_Resource_Setup $installer */
16
+ $ installer = $ this ;
17
+ $ installer ->startSetup ();
18
+
19
+ $ table = $ installer ->getTable ('admin/rule ' );
20
+ $ resourceIds = [
21
+ 'admin/system/api/consumer ' => 'admin/system/api/oauth_consumer ' ,
22
+ 'admin/system/api/consumer/delete ' => 'admin/system/api/oauth_consumer/delete ' ,
23
+ 'admin/system/api/consumer/edit ' => 'admin/system/api/oauth_consumer/edit ' ,
24
+ 'admin/system/api/authorizedTokens ' => 'admin/system/api/oauth_authorized_tokens '
25
+ ];
26
+
27
+ foreach ($ resourceIds as $ oldId => $ newId ) {
28
+ $ installer ->getConnection ()->update (
29
+ $ table ,
30
+ ['resource_id ' => $ newId ],
31
+ ['resource_id = ? ' => $ oldId ]
32
+ );
33
+ }
34
+
35
+ $ installer ->endSetup ();
Original file line number Diff line number Diff line change 23
23
<children >
24
24
<api >
25
25
<children >
26
- <consumer translate =" title" module =" oauth" >
26
+ <oauth_consumer translate =" title" module =" oauth" >
27
27
<title >OAuth Consumers</title >
28
28
<sort_order >20</sort_order >
29
29
<children >
36
36
<sort_order >40</sort_order >
37
37
</delete >
38
38
</children >
39
- </consumer >
40
- <authorizedTokens translate =" title" module =" oauth" >
39
+ </oauth_consumer >
40
+ <oauth_authorized_tokens translate =" title" module =" oauth" >
41
41
<title >OAuth Authorized Tokens</title >
42
42
<sort_order >30</sort_order >
43
- </authorizedTokens >
43
+ </oauth_authorized_tokens >
44
44
<oauth_admin_token translate =" title" module =" oauth" >
45
45
<title >OAuth Admin My Apps</title >
46
46
<sort_order >40</sort_order >
Original file line number Diff line number Diff line change 17
17
<config >
18
18
<modules >
19
19
<Mage_Oauth >
20
- <version >1.0.0.0 </version >
20
+ <version >1.0.0.1 </version >
21
21
</Mage_Oauth >
22
22
</modules >
23
23
<global >
You can’t perform that action at this time.
0 commit comments