Skip to content
This repository
Browse code

Update as of 8/1/2012

* Refactored ACL for the backend
  * ACL resources
    * Strict configuration format, validated by XSD schema
    * ACL configuration relocation from `app/code/<pool>/<namespace>/<module>/etc/adminhtml.xml` to `app/code/<pool>/<namespace>/<module>/etc/adminhtml/acl.xml`
    * Renamed ACL resource identifiers according to the format `<namespace>_<module>::<resource>` throughout the system
      * Backend menu configuration requires to specify ACL resource identifier in the new format
      * Explicit declaration of ACL resources in `app/code/<pool>/<namespace>/<module>/etc/system.xml` instead of implicit relation by XPath
    * Migration tool `dev/tools/migration/acl.php` to convert ACL configuration from 1.x to 2.x
  * Declaration of ACL resource/role/rule loaders through the area configuration
    * Module `Mage_Backend` declares loader for ACL resources in backend area
    * Module `Mage_User` declares loaders for ACL roles and rules (relations between roles and resources) in backend area
  * Implemented integrity and legacy tests for ACL
* Fixed issues:
  * Losing qty and visibility information when importing products
  * Impossibility to reload captcha on backend
  * Temporary excluded from execution integration test `Mage_Review_Model_Resource_Review_Product_CollectionTest::testGetResultingIds()` and corresponding fixture script, which cause occasional `segmentation fault` (exit code 139)
* Refactored methods with high cyclomatic complexity:
  * `Mage_Adminhtml_Block_System_Store_Edit_Form::_prepareForm()`
  * `Mage_Adminhtml_Block_System_Config_Form::initForm()`
  * `Mage_Adminhtml_Block_System_Config_Form::initFields()`
* GitHub requests:
  * [#32](#32) -- fixed declaration of localization CSV files
  * [#35](#35) -- removed non-used `Mage_Core_Block_Flush` block
  * [#41](#41) -- implemented ability to extends `app/etc/local.xml` by specifying additional config file via `MAGE_LOCAL_CONFIG` environment variable
  • Loading branch information...
commit 7fec10a1d6238d8e0058f9907535d98898b7f3d0 1 parent a27835b
authored August 01, 2012

Showing 301 changed files with 3,872 additions and 3,383 deletions. Show diff stats Hide diff stats

  1. 27  CHANGELOG.markdown
  2. 22  app/code/community/Phoenix/Moneybookers/etc/{adminhtml.xml → adminhtml/acl.xml}
  3. 1  app/code/community/Phoenix/Moneybookers/etc/system.xml
  4. 215  app/code/core/Mage/Admin/Model/Config.php
  5. 171  app/code/core/Mage/Admin/Model/Resource/Acl.php
  6. 63  app/code/core/Mage/AdminNotification/etc/adminhtml.xml
  7. 28  app/code/core/Mage/{DesignEditor/etc/adminhtml.xml → AdminNotification/etc/adminhtml/acl.xml}
  8. 2  app/code/core/Mage/AdminNotification/etc/adminhtml/menu.xml
  9. 2  app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php
  10. 2  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php
  11. 4  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
  12. 2  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php
  13. 8  app/code/core/Mage/Adminhtml/Block/Cms/Page.php
  14. 10  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
  15. 8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php
  16. 8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
  17. 8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php
  18. 8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php
  19. 2  app/code/core/Mage/Adminhtml/Block/Customer/Edit.php
  20. 8  app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
  21. 2  app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php
  22. 3  app/code/core/Mage/Adminhtml/Block/Notification/Survey.php
  23. 2  app/code/core/Mage/Adminhtml/Block/Notification/Window.php
  24. 4  app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php
  25. 4  app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
  26. 2  app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php
  27. 2  app/code/core/Mage/Adminhtml/Block/Sales/Order.php
  28. 8  app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php
  29. 10  app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
  30. 2  app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php
  31. 14  app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php
  32. 2  app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php
  33. 26  app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
  34. 2  app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php
  35. 2  app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php
  36. 4  app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php
  37. 2  app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php
  38. 476  app/code/core/Mage/Adminhtml/Block/System/Config/Form.php
  39. 12  app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php
  40. 25  app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php
  41. 346  app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php
  42. 120  app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form/Group.php
  43. 148  app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form/Store.php
  44. 111  app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form/Website.php
  45. 90  app/code/core/Mage/Adminhtml/Block/System/Store/Edit/FormAbstract.php
  46. 2  app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php
  47. 2  app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php
  48. 2  app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php
  49. 2  app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php
  50. 2  app/code/core/Mage/Adminhtml/controllers/Api/UserController.php
  51. 2  app/code/core/Mage/Adminhtml/controllers/CacheController.php
  52. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php
  53. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php
  54. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php
  55. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php
  56. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php
  57. 4  app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php
  58. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php
  59. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php
  60. 2  app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php
  61. 2  app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php
  62. 2  app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php
  63. 6  app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php
  64. 2  app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php
  65. 2  app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php
  66. 2  app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php
  67. 2  app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php
  68. 2  app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php
  69. 5  app/code/core/Mage/Adminhtml/controllers/CustomerController.php
  70. 2  app/code/core/Mage/Adminhtml/controllers/DashboardController.php
  71. 2  app/code/core/Mage/Adminhtml/controllers/IndexController.php
  72. 4  app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php
  73. 3  app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php
  74. 2  app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php
  75. 2  app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php
  76. 2  app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php
  77. 2  app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php
  78. 10  app/code/core/Mage/Adminhtml/controllers/NotificationController.php
  79. 2  app/code/core/Mage/Adminhtml/controllers/Poll/AnswerController.php
  80. 2  app/code/core/Mage/Adminhtml/controllers/PollController.php
  81. 2  app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php
  82. 2  app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php
  83. 2  app/code/core/Mage/Adminhtml/controllers/Promo/WidgetController.php
  84. 2  app/code/core/Mage/Adminhtml/controllers/PromoController.php
  85. 2  app/code/core/Mage/Adminhtml/controllers/RatingController.php
  86. 8  app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php
  87. 8  app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php
  88. 6  app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php
  89. 18  app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php
  90. 9  app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php
  91. 2  app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php
  92. 10  app/code/core/Mage/Adminhtml/controllers/Report/TagController.php
  93. 4  app/code/core/Mage/Adminhtml/controllers/ReportController.php
  94. 6  app/code/core/Mage/Adminhtml/controllers/Sales/Billing/AgreementController.php
  95. 10  app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php
  96. 2  app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php
  97. 2  app/code/core/Mage/Adminhtml/controllers/Sales/Order/StatusController.php
  98. 18  app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php
  99. 4  app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php
  100. 2  app/code/core/Mage/Adminhtml/controllers/SitemapController.php
  101. 3  app/code/core/Mage/Adminhtml/controllers/SurveyController.php
  102. 2  app/code/core/Mage/Adminhtml/controllers/System/AccountController.php
  103. 2  app/code/core/Mage/Adminhtml/controllers/System/BackupController.php
  104. 8  app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php
  105. 2  app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php
  106. 2  app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php
  107. 2  app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php
  108. 2  app/code/core/Mage/Adminhtml/controllers/System/DesignController.php
  109. 2  app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php
  110. 2  app/code/core/Mage/Adminhtml/controllers/System/StoreController.php
  111. 2  app/code/core/Mage/Adminhtml/controllers/System/VariableController.php
  112. 2  app/code/core/Mage/Adminhtml/controllers/SystemController.php
  113. 6  app/code/core/Mage/Adminhtml/controllers/TagController.php
  114. 2  app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php
  115. 2  app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php
  116. 4  app/code/core/Mage/Adminhtml/controllers/Tax/ClassController.php
  117. 6  app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php
  118. 2  app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php
  119. 2  app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php
  120. 177  app/code/core/Mage/Adminhtml/etc/adminhtml.xml
  121. 70  app/code/core/Mage/Adminhtml/etc/adminhtml/acl.xml
  122. 30  app/code/core/Mage/Adminhtml/etc/adminhtml/menu.xml
  123. 6  app/code/core/Mage/Adminhtml/etc/config.xml
  124. 4  app/code/core/Mage/Adminhtml/view/adminhtml/adminnotification.xml
  125. 2  app/code/core/Mage/Adminhtml/view/adminhtml/page/header.phtml
  126. 2  app/code/core/Mage/Adminhtml/view/adminhtml/system/config/switcher.phtml
  127. 62  app/code/core/Mage/Api/etc/adminhtml.xml
  128. 28  app/code/core/Mage/{CatalogInventory/etc/adminhtml.xml → Api/etc/adminhtml/acl.xml}
  129. 6  app/code/core/Mage/Api/etc/adminhtml/menu.xml
  130. 1  app/code/core/Mage/Api/etc/system.xml
  131. 2  app/code/core/Mage/Api2/Block/Adminhtml/Attribute/Grid.php
  132. 2  app/code/core/Mage/Api2/Block/Adminhtml/Roles.php
  133. 2  app/code/core/Mage/Api2/Block/Adminhtml/Roles/Grid.php
  134. 2  app/code/core/Mage/Api2/controllers/Adminhtml/Api2/RoleController.php
  135. 73  app/code/core/Mage/Api2/etc/adminhtml.xml
  136. 36  app/code/core/Mage/{Backup/etc/adminhtml.xml → Api2/etc/adminhtml/acl.xml}
  137. 4  app/code/core/Mage/Api2/etc/adminhtml/menu.xml
  138. 2  app/code/core/Mage/Backend/Block/Menu/Item.php
  139. 27  app/code/core/Mage/Backend/Block/Widget/Form/Container.php
  140. 133  app/code/core/Mage/Backend/Model/Acl/Config.php
  141. 110  app/code/core/Mage/Backend/Model/Acl/Config/Reader.php
  142. 31  app/code/core/Mage/{Core/Block/Flush.php → Backend/Model/Acl/Config/Reader/Dom.php}
  143. 43  app/code/core/Mage/Backend/Model/Acl/Config/ReaderInterface.php
  144. 112  app/code/core/Mage/Backend/Model/Acl/Config/acl.xsd
  145. 87  app/code/core/Mage/Backend/Model/Acl/Loader/Resource.php
  146. 14  app/code/core/Mage/Backend/Model/Auth.php
  147. 31  app/code/core/Mage/Backend/Model/Auth/Session.php
  148. 25  app/code/core/Mage/Backend/Model/Menu.php
  149. 3  app/code/core/Mage/Backend/Model/Menu/Builder/Command/Add.php
  150. 4  app/code/core/Mage/Backend/Model/Menu/Config/menu.xsd
  151. 46  app/code/core/Mage/Backend/Model/Menu/Item.php
  152. 11  app/code/core/Mage/Backend/Model/Menu/Item/Validator.php
  153. 7  app/code/core/Mage/Backend/Model/Url.php
  154. 7  app/code/core/Mage/Backend/etc/config.xml
  155. 2  app/code/core/Mage/Backup/Helper/Data.php
  156. 42  app/code/core/Mage/Backup/etc/adminhtml/acl.xml
  157. 2  app/code/core/Mage/Backup/etc/adminhtml/menu.xml
  158. 13  app/code/core/Mage/Captcha/Block/Captcha/Zend.php
  159. 26  app/code/core/Mage/Captcha/etc/config.xml
  160. 77  app/code/core/Mage/Catalog/etc/adminhtml.xml
  161. 50  app/code/core/Mage/Catalog/etc/adminhtml/acl.xml
  162. 14  app/code/core/Mage/Catalog/etc/adminhtml/menu.xml
  163. 1  app/code/core/Mage/Catalog/etc/system.xml
  164. 40  app/code/core/Mage/CatalogInventory/etc/adminhtml/acl.xml
  165. 1  app/code/core/Mage/CatalogInventory/etc/system.xml
  166. 46  app/code/core/Mage/CatalogRule/etc/adminhtml.xml
  167. 38  app/code/core/Mage/CatalogRule/etc/adminhtml/acl.xml
  168. 4  app/code/core/Mage/CatalogRule/etc/adminhtml/menu.xml
  169. 38  app/code/core/Mage/CatalogSearch/etc/adminhtml/acl.xml
  170. 2  app/code/core/Mage/CatalogSearch/etc/adminhtml/menu.xml
  171. 1  app/code/core/Mage/Centinel/etc/system.xml
  172. 57  app/code/core/Mage/Checkout/etc/adminhtml.xml
  173. 43  app/code/core/Mage/Checkout/etc/adminhtml/acl.xml
  174. 2  app/code/core/Mage/Checkout/etc/adminhtml/menu.xml
  175. 1  app/code/core/Mage/Checkout/etc/system.xml
  176. 2  app/code/core/Mage/Cms/Model/Wysiwyg/Config.php
  177. 48  app/code/core/Mage/Cms/etc/adminhtml/acl.xml
  178. 6  app/code/core/Mage/Cms/etc/adminhtml/menu.xml
  179. 1  app/code/core/Mage/Cms/etc/system.xml
  180. 2  app/code/core/Mage/Connect/controllers/Adminhtml/Extension/CustomController.php
  181. 32  app/code/core/Mage/Connect/etc/adminhtml/acl.xml
  182. 6  app/code/core/Mage/Connect/etc/adminhtml/menu.xml
  183. 9  app/code/core/Mage/Connect/etc/config.xml
  184. 40  app/code/core/Mage/Contacts/etc/adminhtml/acl.xml
  185. 1  app/code/core/Mage/Contacts/etc/system.xml
  186. 98  app/code/core/Mage/Core/Model/Acl/Builder.php
  187. 42  app/code/core/Mage/Core/Model/Config.php
  188. 8  app/code/core/Mage/Core/etc/system.xml
  189. 2  app/code/core/Mage/CurrencySymbol/controllers/Adminhtml/System/CurrencysymbolController.php
  190. 54  app/code/core/Mage/CurrencySymbol/etc/adminhtml.xml
  191. 41  app/code/core/Mage/CurrencySymbol/etc/adminhtml/acl.xml
  192. 6  app/code/core/Mage/CurrencySymbol/etc/adminhtml/menu.xml
  193. 45  app/code/core/Mage/Customer/etc/adminhtml/acl.xml
  194. 8  app/code/core/Mage/Customer/etc/adminhtml/menu.xml
  195. 1  app/code/core/Mage/Customer/etc/system.xml
  196. 11  app/code/core/Mage/Dataflow/etc/config.xml
  197. 2  app/code/core/Mage/DesignEditor/controllers/Adminhtml/System/Design/EditorController.php
  198. 40  app/code/core/Mage/DesignEditor/etc/adminhtml/acl.xml
  199. 2  app/code/core/Mage/DesignEditor/etc/adminhtml/menu.xml
  200. 1  app/code/core/Mage/Directory/etc/system.xml
  201. 2  app/code/core/Mage/Downloadable/controllers/Adminhtml/Downloadable/FileController.php
  202. 48  app/code/core/Mage/Downloadable/etc/adminhtml.xml
  203. 40  app/code/core/Mage/Downloadable/etc/adminhtml/acl.xml
  204. 2  app/code/core/Mage/Downloadable/etc/adminhtml/menu.xml
  205. 7  app/code/core/Mage/Eav/Model/Entity/Abstract.php
  206. 17  app/code/core/Mage/Eav/Model/Entity/Attribute.php
  207. 40  app/code/core/Mage/GoogleAnalytics/etc/adminhtml/acl.xml
  208. 1  app/code/core/Mage/GoogleAnalytics/etc/system.xml
  209. 48  app/code/core/Mage/GoogleCheckout/etc/adminhtml.xml
  210. 40  app/code/core/Mage/GoogleCheckout/etc/adminhtml/acl.xml
  211. 1  app/code/core/Mage/GoogleCheckout/etc/system.xml
  212. 8  app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php
  213. 2  app/code/core/Mage/GoogleShopping/controllers/Adminhtml/Googleshopping/ItemsController.php
  214. 2  app/code/core/Mage/GoogleShopping/controllers/Adminhtml/Googleshopping/TypesController.php
  215. 55  app/code/core/Mage/GoogleShopping/etc/adminhtml.xml
  216. 41  app/code/core/Mage/GoogleShopping/etc/adminhtml/acl.xml
  217. 6  app/code/core/Mage/GoogleShopping/etc/adminhtml/menu.xml
  218. 29  app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php
  219. 29  app/code/core/Mage/ImportExport/Model/Import/Entity/Product/Type/Abstract.php
  220. 2  app/code/core/Mage/ImportExport/controllers/Adminhtml/ExportController.php
  221. 2  app/code/core/Mage/ImportExport/controllers/Adminhtml/ImportController.php
  222. 53  app/code/core/Mage/ImportExport/etc/adminhtml.xml
  223. 41  app/code/core/Mage/ImportExport/etc/adminhtml/acl.xml
  224. 4  app/code/core/Mage/ImportExport/etc/adminhtml/menu.xml
  225. 9  app/code/core/Mage/ImportExport/etc/config.xml
  226. 2  app/code/core/Mage/Index/Block/Adminhtml/Notifications.php
  227. 2  app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php
  228. 38  app/code/core/Mage/Index/etc/adminhtml/acl.xml
  229. 2  app/code/core/Mage/Index/etc/adminhtml/menu.xml
  230. 66  app/code/core/Mage/Newsletter/etc/adminhtml.xml
  231. 46  app/code/core/Mage/Newsletter/etc/adminhtml/acl.xml
  232. 10  app/code/core/Mage/Newsletter/etc/adminhtml/menu.xml
  233. 1  app/code/core/Mage/Newsletter/etc/system.xml
  234. 2  app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/AuthorizedTokens/Grid.php
  235. 2  app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer.php
  236. 2  app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer/Edit.php
  237. 2  app/code/core/Mage/Oauth/Block/Adminhtml/Oauth/Consumer/Grid.php
  238. 2  app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/Admin/TokenController.php
  239. 2  app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/AuthorizedTokensController.php
  240. 24  app/code/core/Mage/Oauth/controllers/Adminhtml/Oauth/ConsumerController.php
  241. 75  app/code/core/Mage/Oauth/etc/adminhtml.xml
  242. 48  app/code/core/Mage/Oauth/etc/adminhtml/acl.xml
  243. 6  app/code/core/Mage/Oauth/etc/adminhtml/menu.xml
  244. 1  app/code/core/Mage/Oauth/etc/system.xml
  245. 9  app/code/core/Mage/Ogone/etc/config.xml
  246. 2  app/code/core/Mage/PageCache/Block/Adminhtml/Cache/Additional.php
  247. 2  app/code/core/Mage/PageCache/controllers/Adminhtml/PageCacheController.php
  248. 36  app/code/core/Mage/PageCache/etc/adminhtml/acl.xml
  249. 51  app/code/core/Mage/Payment/etc/adminhtml.xml
  250. 41  app/code/core/Mage/Payment/etc/adminhtml/acl.xml
  251. 1  app/code/core/Mage/Payment/etc/system.xml
  252. 6  app/code/core/Mage/Paypal/controllers/Adminhtml/Paypal/ReportsController.php
  253. 67  app/code/core/Mage/Paypal/etc/adminhtml.xml
  254. 48  app/code/core/Mage/Paypal/etc/adminhtml/acl.xml
  255. 2  app/code/core/Mage/Paypal/etc/adminhtml/menu.xml
  256. 48  app/code/core/Mage/Persistent/etc/adminhtml.xml
  257. 40  app/code/core/Mage/Persistent/etc/adminhtml/acl.xml
  258. 2  app/code/core/Mage/Persistent/etc/system.xml
  259. 38  app/code/core/Mage/Poll/etc/adminhtml/acl.xml
  260. 2  app/code/core/Mage/Poll/etc/adminhtml/menu.xml
  261. 48  app/code/core/Mage/Rating/etc/adminhtml.xml
  262. 40  app/code/core/Mage/Rating/etc/adminhtml/acl.xml
  263. 153  app/code/core/Mage/Reports/etc/adminhtml.xml
  264. 77  app/code/core/Mage/Reports/etc/adminhtml/acl.xml
  265. 44  app/code/core/Mage/Reports/etc/adminhtml/menu.xml
  266. 1  app/code/core/Mage/Reports/etc/system.xml
  267. 57  app/code/core/Mage/Review/etc/adminhtml.xml
  268. 27  app/code/core/Mage/{Contacts/etc/adminhtml.xml → Review/etc/adminhtml/acl.xml}
  269. 16  app/code/core/Mage/Review/etc/adminhtml/menu.xml
  270. 2  app/code/core/Mage/Rss/controllers/OrderController.php
  271. 49  app/code/core/Mage/Rss/etc/adminhtml.xml
  272. 40  app/code/core/Mage/Rss/etc/adminhtml/acl.xml
  273. 1  app/code/core/Mage/Rss/etc/system.xml
  274. 10  app/code/core/Mage/Sales/Block/Adminhtml/Billing/Agreement/View.php
  275. 2  app/code/core/Mage/Sales/Block/Adminhtml/Recurring/Profile/View/Tab/Orders.php
  276. 2  app/code/core/Mage/Sales/Model/Observer.php
  277. 139  app/code/core/Mage/Sales/etc/adminhtml.xml
  278. 78  app/code/core/Mage/Sales/etc/adminhtml/acl.xml
  279. 18  app/code/core/Mage/Sales/etc/adminhtml/menu.xml
  280. 3  app/code/core/Mage/Sales/etc/system.xml
  281. 43  app/code/core/Mage/SalesRule/etc/adminhtml/acl.xml
  282. 2  app/code/core/Mage/SalesRule/etc/adminhtml/menu.xml
  283. 1  app/code/core/Mage/Sendfriend/etc/system.xml
  284. 53  app/code/core/Mage/Shipping/etc/adminhtml.xml
  285. 41  app/code/core/Mage/Shipping/etc/adminhtml/acl.xml
  286. 2  app/code/core/Mage/Shipping/etc/system.xml
  287. 55  app/code/core/Mage/Sitemap/etc/adminhtml.xml
  288. 43  app/code/core/Mage/Sitemap/etc/adminhtml/acl.xml
  289. 2  app/code/core/Mage/Sitemap/etc/adminhtml/menu.xml
  290. 1  app/code/core/Mage/Sitemap/etc/system.xml
  291. 52  app/code/core/Mage/Tag/etc/adminhtml.xml
  292. 41  app/code/core/Mage/Tag/etc/adminhtml/acl.xml
  293. 14  app/code/core/Mage/Tag/etc/adminhtml/menu.xml
  294. 79  app/code/core/Mage/Tax/etc/adminhtml.xml
  295. 49  app/code/core/Mage/Tax/etc/adminhtml/acl.xml
  296. 12  app/code/core/Mage/Tax/etc/adminhtml/menu.xml
  297. 1  app/code/core/Mage/Tax/etc/system.xml
  298. 52  app/code/core/Mage/User/Block/Role/Tab/Edit.php
  299. 84  app/code/core/Mage/User/Model/Acl/Loader/Role.php
  300. 72  app/code/core/Mage/User/Model/Acl/Loader/Rule.php
27  CHANGELOG.markdown
Source Rendered
... ...
@@ -1,3 +1,30 @@
  1
+Update as of 8/1/2012
  2
+=====================
  3
+* Refactored ACL for the backend
  4
+  * ACL resources
  5
+    * Strict configuration format, validated by XSD schema
  6
+    * ACL configuration relocation from `app/code/<pool>/<namespace>/<module>/etc/adminhtml.xml` to `app/code/<pool>/<namespace>/<module>/etc/adminhtml/acl.xml`
  7
+    * Renamed ACL resource identifiers according to the format `<namespace>_<module>::<resource>` throughout the system
  8
+      * Backend menu configuration requires to specify ACL resource identifier in the new format
  9
+      * Explicit declaration of ACL resources in `app/code/<pool>/<namespace>/<module>/etc/system.xml` instead of implicit relation by XPath
  10
+    * Migration tool `dev/tools/migration/acl.php` to convert ACL configuration from 1.x to 2.x
  11
+  * Declaration of ACL resource/role/rule loaders through the area configuration
  12
+    * Module `Mage_Backend` declares loader for ACL resources in backend area
  13
+    * Module `Mage_User` declares loaders for ACL roles and rules (relations between roles and resources) in backend area
  14
+  * Implemented integrity and legacy tests for ACL
  15
+* Fixed issues:
  16
+  * Losing qty and visibility information when importing products
  17
+  * Impossibility to reload captcha on backend
  18
+  * Temporary excluded from execution integration test `Mage_Review_Model_Resource_Review_Product_CollectionTest::testGetResultingIds()` and corresponding fixture script, which cause occasional `segmentation fault` (exit code 139)
  19
+* Refactored methods with high cyclomatic complexity:
  20
+  * `Mage_Adminhtml_Block_System_Store_Edit_Form::_prepareForm()`
  21
+  * `Mage_Adminhtml_Block_System_Config_Form::initForm()`
  22
+  * `Mage_Adminhtml_Block_System_Config_Form::initFields()`
  23
+* GitHub requests:
  24
+  * [#32](https://github.com/magento/magento2/pull/32) -- fixed declaration of localization CSV files
  25
+  * [#35](https://github.com/magento/magento2/issues/35) -- removed non-used `Mage_Core_Block_Flush` block
  26
+  * [#41](https://github.com/magento/magento2/pull/41) -- implemented ability to extends `app/etc/local.xml` by specifying additional config file via `MAGE_LOCAL_CONFIG` environment variable
  27
+
1 28
 Update as of 7/26/2012
2 29
 =====================
3 30
 * Implemented Magento Validator library in order to have clear solid mechanism and formal rules of input data validation
22  .../community/Phoenix/Moneybookers/etc/adminhtml.xml → ...munity/Phoenix/Moneybookers/etc/adminhtml/acl.xml
@@ -28,21 +28,13 @@
28 28
 <config>
29 29
     <acl>
30 30
         <resources>
31  
-            <admin>
32  
-                <children>
33  
-                    <system>
34  
-                        <children>
35  
-                            <config>
36  
-                                <children>
37  
-                                    <moneybookers translate="title" module="Phoenix_Moneybookers">
38  
-                                        <title>Moneybookers Settings</title>
39  
-                                    </moneybookers>
40  
-                                </children>
41  
-                            </config>
42  
-                        </children>
43  
-                    </system>
44  
-                </children>
45  
-            </admin>
  31
+            <resource id="Mage_Adminhtml::admin">
  32
+                <resource id="Mage_Adminhtml::system">
  33
+                    <resource id="Mage_Adminhtml::config">
  34
+                        <resource id="Phoenix_Moneybookers::moneybookers" module="Phoenix_Moneybookers" title="Moneybookers Settings" />
  35
+                    </resource>
  36
+                </resource>
  37
+            </resource>
46 38
         </resources>
47 39
     </acl>
48 40
 </config>
1  app/code/community/Phoenix/Moneybookers/etc/system.xml
@@ -35,6 +35,7 @@
35 35
             <show_in_default>1</show_in_default>
36 36
             <show_in_website>1</show_in_website>
37 37
             <show_in_store>1</show_in_store>
  38
+            <resource>Phoenix_Moneybookers::moneybookers</resource>
38 39
             <groups>
39 40
                 <settings translate="label">
40 41
                     <label>Moneybookers Settings</label>
215  app/code/core/Mage/Admin/Model/Config.php
@@ -110,221 +110,6 @@ protected function _getHelper($module)
110 110
     }
111 111
 
112 112
     /**
113  
-     * Load Acl resources from config
114  
-     *
115  
-     * @param Mage_Admin_Model_Acl $acl
116  
-     * @param Mage_Core_Model_Config_Element $resource
117  
-     * @param string $parentName
118  
-     * @return Mage_Admin_Model_Config
119  
-     */
120  
-    public function loadAclResources(Mage_Admin_Model_Acl $acl, $resource = null, $parentName = null)
121  
-    {
122  
-        if (is_null($resource)) {
123  
-            $resource = $this->getAdminhtmlConfig()->getNode("acl/resources");
124  
-            $resourceName = null;
125  
-        } else {
126  
-            $resourceName = (is_null($parentName) ? '' : $parentName . '/') . $resource->getName();
127  
-            $acl->add(Mage::getModel('Mage_Admin_Model_Acl_Resource', $resourceName), $parentName);
128  
-        }
129  
-
130  
-        if (isset($resource->all)) {
131  
-            $acl->add(Mage::getModel('Mage_Admin_Model_Acl_Resource', 'all'), null);
132  
-        }
133  
-
134  
-        if (isset($resource->admin)) {
135  
-            $children = $resource->admin;
136  
-        } elseif (isset($resource->children)){
137  
-            $children = $resource->children->children();
138  
-        }
139  
-
140  
-
141  
-
142  
-        if (empty($children)) {
143  
-            return $this;
144  
-        }
145  
-
146  
-        foreach ($children as $res) {
147  
-            if (1 == $res->disabled) {
148  
-                continue;
149  
-            }
150  
-            $this->loadAclResources($acl, $res, $resourceName);
151  
-        }
152  
-        return $this;
153  
-    }
154  
-
155  
-    /**
156  
-     * Retrieve Acl Resource Tree with module and path information
157  
-     *
158  
-     * @return Varien_Simplexml_Element
159  
-     */
160  
-    public function getAclResourceTree()
161  
-    {
162  
-        return $this->_walkResourceTree();
163  
-    }
164  
-
165  
-    /**
166  
-     * Retrieve flat Acl Resource list with level information
167  
-     * @param bool $shortFormat
168  
-     * @return array
169  
-     */
170  
-    public function getAclResourceList($shortFormat = false)
171  
-    {
172  
-        return $this->_flattenResourceTree(null, null, 0, 'Mage_Backend', $shortFormat);
173  
-    }
174  
-
175  
-    /**
176  
-     * Decorate acl resource tree
177  
-     *
178  
-     * @param  Varien_Simplexml_Element $resource
179  
-     * @param  null $parentName
180  
-     * @param  string $module
181  
-     * @return Varien_Simplexml_Element
182  
-     */
183  
-    protected function _walkResourceTree(Varien_Simplexml_Element $resource = null,
184  
-        $parentName = null, $module = 'Mage_Backend')
185  
-    {
186  
-        $resourceName = $parentName;
187  
-        if (is_null($resource)) {
188  
-            $resource = $this->getAdminhtmlConfig()->getNode('acl/resources');
189  
-            $resourceName = null;
190  
-            $level = -1;
191  
-        } else {
192  
-            if (!$this->_isServiceElement($resource)) {
193  
-                $resourceName = $this->_buildFullResourceName($resource, $parentName);
194  
-                //assigning module for its' children nodes
195  
-                if ($resource->getAttribute('module')) {
196  
-                    $module = (string)$resource->getAttribute('module');
197  
-
198  
-                }
199  
-                $resource->addAttribute('aclpath', $resourceName);
200  
-                $resource->addAttribute('module_c', $module);
201  
-            }
202  
-        }
203  
-
204  
-        //check children and run recursion if they exists
205  
-        $children = $resource->children();
206  
-        foreach ($children as $key => $child) {
207  
-            if (1 == $child->disabled) {
208  
-                $resource->{$key} = null;
209  
-                continue;
210  
-            }
211  
-            $this->_walkResourceTree($child, $resourceName, $module);
212  
-        }
213  
-        return $resource;
214  
-    }
215  
-
216  
-    /**
217  
-     * Flatten acl resources tree
218  
-     *
219  
-     * @param null|Varien_Simplexml_Element $resource
220  
-     * @param null $parentName
221  
-     * @param int $level
222  
-     * @param string $module
223  
-     * @param bool $shortFormat
224  
-     * @return array
225  
-     */
226  
-    protected function _flattenResourceTree(Varien_Simplexml_Element $resource = null,
227  
-        $parentName = null, $level = 0, $module = 'Mage_Backend', $shortFormat = false)
228  
-    {
229  
-        $result = array();
230  
-        $resourceName = $parentName;
231  
-        if (is_null($resource)) {
232  
-            $resource = $this->getAdminhtmlConfig()->getNode('acl/resources');
233  
-            $resourceName = null;
234  
-            $level = -1;
235  
-        } else {
236  
-            if (!$this->_isServiceElement($resource)) {
237  
-                $resourceName = $this->_buildFullResourceName($resource, $parentName);
238  
-
239  
-                if ($shortFormat) {
240  
-                    $result[] = $resourceName;
241  
-                } else {
242  
-                    if ($resource->getAttribute('module')) {
243  
-                        $module = (string)$resource->getAttribute('module');
244  
-                    }
245  
-                    $result[$resourceName]['name']  = $this->_getHelper($module)->__((string)$resource->title);
246  
-                    $result[$resourceName]['level'] = $level;
247  
-                }
248  
-            }
249  
-        }
250  
-        //check children and run recursion if they exists
251  
-        $children = $resource->children();
252  
-        foreach ($children as $key => $child) {
253  
-            if (1 == $child->disabled) {
254  
-                continue;
255  
-            }
256  
-            $result = array_merge(
257  
-                $this->_flattenResourceTree($child, $resourceName, $level + 1, $module, $shortFormat),
258  
-                $result
259  
-            );
260  
-        }
261  
-        return $result;
262  
-    }
263  
-
264  
-    /**
265  
-     * Check whether provided element is a service element of Admin Xml configuration
266  
-     *
267  
-     * @param Varien_Simplexml_Element $resource
268  
-     * @return bool
269  
-     */
270  
-    protected function _isServiceElement(Varien_Simplexml_Element $resource)
271  
-    {
272  
-        return in_array($resource->getName(), array('title', 'sort_order', 'children', 'disabled'));
273  
-    }
274  
-
275  
-    /**
276  
-     * Build acl resource name with path to parent
277  
-     *
278  
-     * @param Varien_Simplexml_Element $resource
279  
-     * @param string $path
280  
-     * @return string
281  
-     */
282  
-    protected function _buildFullResourceName(Varien_Simplexml_Element $resource, $path = null)
283  
-    {
284  
-        return (is_null($path) ? '' : $path . '/') . $resource->getName();
285  
-    }
286  
-
287  
-    /**
288  
-     * Get acl assert config
289  
-     *
290  
-     * @param string $name
291  
-     * @return Mage_Core_Model_Config_Element|boolean
292  
-     */
293  
-    public function getAclAssert($name = '')
294  
-    {
295  
-        $asserts = $this->getNode("admin/acl/asserts");
296  
-        if ('' === $name) {
297  
-            return $asserts;
298  
-        }
299  
-
300  
-        if (isset($asserts->$name)) {
301  
-            return $asserts->$name;
302  
-        }
303  
-
304  
-        return false;
305  
-    }
306  
-
307  
-    /**
308  
-     * Retrieve privilege set by name
309  
-     *
310  
-     * @param string $name
311  
-     * @return Mage_Core_Model_Config_Element|boolean
312  
-     */
313  
-    public function getAclPrivilegeSet($name = '')
314  
-    {
315  
-        $sets = $this->getNode("admin/acl/privilegeSets");
316  
-        if ('' === $name) {
317  
-            return $sets;
318  
-        }
319  
-
320  
-        if (isset($sets->$name)) {
321  
-            return $sets->$name;
322  
-        }
323  
-
324  
-        return false;
325  
-    }
326  
-
327  
-    /**
328 113
      * Retrieve xml config
329 114
      *
330 115
      * @return Varien_Simplexml_Config
171  app/code/core/Mage/Admin/Model/Resource/Acl.php
... ...
@@ -1,171 +0,0 @@
1  
-<?php
2  
-/**
3  
- * Magento
4  
- *
5  
- * NOTICE OF LICENSE
6  
- *
7  
- * This source file is subject to the Open Software License (OSL 3.0)
8  
- * that is bundled with this package in the file LICENSE.txt.
9  
- * It is also available through the world-wide-web at this URL:
10  
- * http://opensource.org/licenses/osl-3.0.php
11  
- * If you did not receive a copy of the license and are unable to
12  
- * obtain it through the world-wide-web, please send an email
13  
- * to license@magentocommerce.com so we can send you a copy immediately.
14  
- *
15  
- * DISCLAIMER
16  
- *
17  
- * Do not edit or add to this file if you wish to upgrade Magento to newer
18  
- * versions in the future. If you wish to customize Magento for your
19  
- * needs please refer to http://www.magentocommerce.com for more information.
20  
- *
21  
- * @category    Mage
22  
- * @package     Mage_Admin
23  
- * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
24  
- * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
25  
- */
26  
-
27  
-
28  
-/**
29  
- * Resource model for admin ACL
30  
- *
31  
- * @category    Mage
32  
- * @package     Mage_Admin
33  
- * @author      Magento Core Team <core@magentocommerce.com>
34  
- */
35  
-class Mage_Admin_Model_Resource_Acl extends Mage_Core_Model_Resource_Db_Abstract
36  
-{
37  
-    const ACL_ALL_RULES = 'all';
38  
-
39  
-    /**
40  
-     * Initialize resource
41  
-     *
42  
-     */
43  
-    protected function _construct()
44  
-    {
45  
-        $this->_init('admin_role', 'role_id');
46  
-    }
47  
-
48  
-    /**
49  
-     * Load ACL for the user
50  
-     *
51  
-     * @return Mage_Admin_Model_Acl
52  
-     */
53  
-    public function loadAcl()
54  
-    {
55  
-        $acl = Mage::getModel('Mage_Admin_Model_Acl');
56  
-
57  
-        Mage::getSingleton('Mage_Admin_Model_Config')->loadAclResources($acl);
58  
-
59  
-        $roleTable   = $this->getTable('admin_role');
60  
-        $ruleTable   = $this->getTable('admin_rule');
61  
-        $assertTable = $this->getTable('admin_assert');
62  
-
63  
-        $adapter = $this->_getReadAdapter();
64  
-
65  
-        $select = $adapter->select()
66  
-            ->from($roleTable)
67  
-            ->order('tree_level');
68  
-
69  
-        $rolesArr = $adapter->fetchAll($select);
70  
-
71  
-        $this->loadRoles($acl, $rolesArr);
72  
-
73  
-        $select = $adapter->select()
74  
-            ->from(array('r' => $ruleTable))
75  
-            ->joinLeft(
76  
-                array('a' => $assertTable),
77  
-                'a.assert_id = r.assert_id',
78  
-                array('assert_type', 'assert_data')
79  
-            );
80  
-
81  
-        $rulesArr = $adapter->fetchAll($select);
82  
-
83  
-        $this->loadRules($acl, $rulesArr);
84  
-
85  
-        return $acl;
86  
-    }
87  
-
88  
-    /**
89  
-     * Load roles
90  
-     *
91  
-     * @param Mage_Admin_Model_Acl $acl
92  
-     * @param array $rolesArr
93  
-     * @return Mage_Admin_Model_Resource_Acl
94  
-     */
95  
-    public function loadRoles(Mage_Admin_Model_Acl $acl, array $rolesArr)
96  
-    {
97  
-        foreach ($rolesArr as $role) {
98  
-            $parent = ($role['parent_id'] > 0) ? Mage_Admin_Model_Acl::ROLE_TYPE_GROUP . $role['parent_id'] : null;
99  
-            switch ($role['role_type']) {
100  
-                case Mage_Admin_Model_Acl::ROLE_TYPE_GROUP:
101  
-                    $roleId = $role['role_type'] . $role['role_id'];
102  
-                    $acl->addRole(Mage::getModel('Mage_Admin_Model_Acl_Role_Group', $roleId), $parent);
103  
-                    break;
104  
-
105  
-                case Mage_Admin_Model_Acl::ROLE_TYPE_USER:
106  
-                    $roleId = $role['role_type'] . $role['user_id'];
107  
-                    if (!$acl->hasRole($roleId)) {
108  
-                        $acl->addRole(Mage::getModel('Mage_Admin_Model_Acl_Role_User', $roleId), $parent);
109  
-                    } else {
110  
-                        $acl->addRoleParent($roleId, $parent);
111  
-                    }
112  
-                    break;
113  
-            }
114  
-        }
115  
-
116  
-        return $this;
117  
-    }
118  
-
119  
-    /**
120  
-     * Load rules
121  
-     *
122  
-     * @param Mage_Admin_Model_Acl $acl
123  
-     * @param array $rulesArr
124  
-     * @return Mage_Admin_Model_Resource_Acl
125  
-     */
126  
-    public function loadRules(Mage_Admin_Model_Acl $acl, array $rulesArr)
127  
-    {
128  
-        foreach ($rulesArr as $rule) {
129  
-            $role = $rule['role_type'] . $rule['role_id'];
130  
-            $resource = $rule['resource_id'];
131  
-            $privileges = !empty($rule['privileges']) ? explode(',', $rule['privileges']) : null;
132  
-
133  
-            $assert = null;
134  
-            if (0 != $rule['assert_id']) {
135  
-                $assertClass = Mage::getSingleton('Mage_Admin_Model_Config')->getAclAssert($rule['assert_type'])->getClassName();
136  
-                $assert = new $assertClass(unserialize($rule['assert_data']));
137  
-            }
138  
-            try {
139  
-                if ( $rule['permission'] == 'allow' ) {
140  
-                    if ($resource === self::ACL_ALL_RULES) {
141  
-                        $acl->allow($role, null, $privileges, $assert);
142  
-                    }
143  
-                    $acl->allow($role, $resource, $privileges, $assert);
144  
-                } else if ( $rule['permission'] == 'deny' ) {
145  
-                    $acl->deny($role, $resource, $privileges, $assert);
146  
-                }
147  
-            } catch (Exception $e) {
148  
-                //$m = $e->getMessage();
149  
-                //if ( eregi("^Resource '(.*)' not found", $m) ) {
150  
-                    // Deleting non existent resource rule from rules table
151  
-                    //$cond = $this->_write->quoteInto('resource_id = ?', $resource);
152  
-                    //$this->_write->delete(Mage::getSingleton('Mage_Core_Model_Resource')->getTableName('admin_rule'), $cond);
153  
-                //} else {
154  
-                    //TODO: We need to log such exceptions to somewhere like a system/errors.log
155  
-                //}
156  
-            }
157  
-            /*
158  
-            switch ($rule['permission']) {
159  
-                case Mage_Admin_Model_Acl::RULE_PERM_ALLOW:
160  
-                    $acl->allow($role, $resource, $privileges, $assert);
161  
-                    break;
162  
-
163  
-                case Mage_Admin_Model_Acl::RULE_PERM_DENY:
164  
-                    $acl->deny($role, $resource, $privileges, $assert);
165  
-                    break;
166  
-            }
167  
-            */
168  
-        }
169  
-        return $this;
170  
-    }
171  
-}
63  app/code/core/Mage/AdminNotification/etc/adminhtml.xml
... ...
@@ -1,63 +0,0 @@
1  
-<?xml version="1.0"?>
2  
-<!--
3  
-/**
4  
- * Magento
5  
- *
6  
- * NOTICE OF LICENSE
7  
- *
8  
- * This source file is subject to the Academic Free License (AFL 3.0)
9  
- * that is bundled with this package in the file LICENSE_AFL.txt.
10  
- * It is also available through the world-wide-web at this URL:
11  
- * http://opensource.org/licenses/afl-3.0.php
12  
- * If you did not receive a copy of the license and are unable to
13  
- * obtain it through the world-wide-web, please send an email
14  
- * to license@magentocommerce.com so we can send you a copy immediately.
15  
- *
16  
- * DISCLAIMER
17  
- *
18  
- * Do not edit or add to this file if you wish to upgrade Magento to newer
19  
- * versions in the future. If you wish to customize Magento for your
20  
- * needs please refer to http://www.magentocommerce.com for more information.
21  
- *
22  
- * @category    Mage
23  
- * @package     Mage_AdminNotification
24  
- * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25  
- * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
26  
- */
27  
--->
28  
-<config>
29  
-    <acl>
30  
-        <resources>
31  
-            <admin>
32  
-                <children>
33  
-                    <system>
34  
-                        <children>
35  
-                            <adminnotification translate="title" module="Mage_AdminNotification">
36  
-                                <title>Notifications</title>
37  
-                                <sort_order>10</sort_order>
38  
-                                <children>
39  
-                                    <show_toolbar translate="title">
40  
-                                        <title>Show Toolbar</title>
41  
-                                        <sort_order>10</sort_order>
42  
-                                    </show_toolbar>
43  
-                                    <show_list translate="title">
44  
-                                        <title>Show List</title>
45  
-                                        <sort_order>20</sort_order>
46  
-                                    </show_list>
47  
-                                    <mark_as_read translate="title">
48  
-                                        <title>Mark as read</title>
49  
-                                        <sort_order>30</sort_order>
50  
-                                    </mark_as_read>
51  
-                                    <remove translate="title">
52  
-                                        <title>Remove</title>
53  
-                                        <sort_order>40</sort_order>
54  
-                                    </remove>
55  
-                                </children>
56  
-                            </adminnotification>
57  
-                        </children>
58  
-                    </system>
59  
-                </children>
60  
-            </admin>
61  
-        </resources>
62  
-    </acl>
63  
-</config>
28  app/code/core/Mage/DesignEditor/etc/adminhtml.xml → ...core/Mage/AdminNotification/etc/adminhtml/acl.xml
@@ -20,7 +20,7 @@
20 20
  * needs please refer to http://www.magentocommerce.com for more information.
21 21
  *
22 22
  * @category    Mage
23  
- * @package     Mage_DesignEditor
  23
+ * @package     Mage_AdminNotification
24 24
  * @copyright   Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
25 25
  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
26 26
  */
@@ -28,22 +28,16 @@
28 28
 <config>
29 29
     <acl>
30 30
         <resources>
31  
-            <admin>
32  
-                <children>
33  
-                    <system>
34  
-                        <children>
35  
-                            <design>
36  
-                                <children>
37  
-                                    <editor translate="title" module="Mage_DesignEditor">
38  
-                                        <title>Editor</title>
39  
-                                        <sort_order>20</sort_order>
40  
-                                    </editor>
41  
-                                </children>
42  
-                            </design>
43  
-                        </children>
44  
-                    </system>
45  
-                </children>
46  
-            </admin>
  31
+            <resource id="Mage_Adminhtml::admin">
  32
+                <resource id="Mage_Adminhtml::system">
  33
+                    <resource id="Mage_AdminNotification::adminnotification" module="Mage_AdminNotification" title="Notifications" sortOrder="10">
  34
+                        <resource id="Mage_AdminNotification::show_toolbar" title="Show Toolbar" sortOrder="10" />
  35
+                        <resource id="Mage_AdminNotification::show_list" title="Show List" sortOrder="20" />
  36
+                        <resource id="Mage_AdminNotification::mark_as_read" title="Mark as read" sortOrder="30" />
  37
+                        <resource id="Mage_AdminNotification::adminnotification_remove" title="Remove" sortOrder="40" />
  38
+                    </resource>
  39
+                </resource>
  40
+            </resource>
47 41
         </resources>
48 42
     </acl>
49 43
 </config>
2  app/code/core/Mage/AdminNotification/etc/adminhtml/menu.xml
@@ -27,6 +27,6 @@
27 27
 -->
28 28
 <config>
29 29
     <menu>
30  
-        <add id="Mage_AdminNotification::system_adminnotification" title="Notifications" module="Mage_AdminNotification" sortOrder="15" parent="Mage_Adminhtml::system" action="adminhtml/notification" />
  30
+        <add id="Mage_AdminNotification::system_adminnotification" title="Notifications" module="Mage_AdminNotification" sortOrder="15" parent="Mage_Adminhtml::system" action="adminhtml/notification" resource="Mage_AdminNotification::adminnotification"/>
31 31
     </menu>
32 32
 </config>
2  app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php
@@ -58,7 +58,7 @@ public function getManageUrl()
58 58
      */
59 59
     protected function _toHtml()
60 60
     {
61  
-        if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('system/cache')) {
  61
+        if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Adminhtml::cache')) {
62 62
             return parent::_toHtml();
63 63
         }
64 64
         return '';
2  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php
@@ -99,7 +99,7 @@ protected function _prepareForm()
99 99
 
100 100
             // Add new attribute button if it is not an image tab
101 101
             if (!$form->getElement('media_gallery')
102  
-                && Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/attributes/attributes')
  102
+                && Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Catalog::attributes_attributes')
103 103
             ) {
104 104
                 $headerBar = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes_Create');
105 105
 
4  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php
@@ -146,7 +146,7 @@ protected function _prepareLayout()
146 146
 
147 147
             if( $this->getRequest()->getParam('id', false) ) {
148 148
                 if (Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Review')) {
149  
-                    if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('admin/catalog/reviews_ratings')){
  149
+                    if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Review::reviews_ratings')){
150 150
                         $this->addTab('reviews', array(
151 151
                             'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Product Reviews'),
152 152
                             'url'   => $this->getUrl('*/*/reviews', array('_current' => true)),
@@ -155,7 +155,7 @@ protected function _prepareLayout()
155 155
                     }
156 156
                 }
157 157
                 if (Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Tag')) {
158  
-                    if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('admin/catalog/tag')){
  158
+                    if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Tag::tag')){
159 159
                         $this->addTab('tags', array(
160 160
                          'label'     => Mage::helper('Mage_Catalog_Helper_Data')->__('Product Tags'),
161 161
                          'url'   => $this->getUrl('*/*/tagGrid', array('_current' => true)),
2  app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php
@@ -301,7 +301,7 @@ protected function _prepareMassaction()
301 301
              )
302 302
         ));
303 303
 
304  
-        if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/update_attributes')){
  304
+        if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Catalog::update_attributes')){
305 305
             $this->getMassactionBlock()->addItem('attributes', array(
306 306
                 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Update Attributes'),
307 307
                 'url'   => $this->getUrl('*/catalog_product_action_attribute/edit', array('_current'=>true))
8  app/code/core/Mage/Adminhtml/Block/Cms/Page.php
@@ -45,7 +45,7 @@ public function __construct()
45 45
 
46 46
         parent::__construct();
47 47
 
48  
-        if ($this->_isAllowedAction('save')) {
  48
+        if ($this->_isAllowedAction('Mage_Cms::save')) {
49 49
             $this->_updateButton('add', 'label', Mage::helper('Mage_Cms_Helper_Data')->__('Add New Page'));
50 50
         } else {
51 51
             $this->_removeButton('add');
@@ -56,12 +56,12 @@ public function __construct()
56 56
     /**
57 57
      * Check permission for passed action
58 58
      *
59  
-     * @param string $action
  59
+     * @param string $resourceId
60 60
      * @return bool
61 61
      */
62  
-    protected function _isAllowedAction($action)
  62
+    protected function _isAllowedAction($resourceId)
63 63
     {
64  
-        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
  64
+        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed($resourceId);
65 65
     }
66 66
 
67 67
 }
10  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php
@@ -45,7 +45,7 @@ public function __construct()
45 45
 
46 46
         parent::__construct();
47 47
 
48  
-        if ($this->_isAllowedAction('save')) {
  48
+        if ($this->_isAllowedAction('Mage_Cms::save')) {
49 49
             $this->_updateButton('save', 'label', Mage::helper('Mage_Cms_Helper_Data')->__('Save Page'));
50 50
             $this->_addButton('saveandcontinue', array(
51 51
                 'label'     => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Save and Continue Edit'),
@@ -56,7 +56,7 @@ public function __construct()
56 56
             $this->_removeButton('save');
57 57
         }
58 58
 
59  
-        if ($this->_isAllowedAction('delete')) {
  59
+        if ($this->_isAllowedAction('Mage_Cms::page_delete')) {
60 60
             $this->_updateButton('delete', 'label', Mage::helper('Mage_Cms_Helper_Data')->__('Delete Page'));
61 61
         } else {
62 62
             $this->_removeButton('delete');
@@ -81,12 +81,12 @@ public function getHeaderText()
81 81
     /**
82 82
      * Check permission for passed action
83 83
      *
84  
-     * @param string $action
  84
+     * @param string $resourceId
85 85
      * @return bool
86 86
      */
87  
-    protected function _isAllowedAction($action)
  87
+    protected function _isAllowedAction($resourceId)
88 88
     {
89  
-        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
  89
+        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed($resourceId);
90 90
     }
91 91
 
92 92
     /**
8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php
@@ -55,7 +55,7 @@ protected function _prepareForm()
55 55
         /*
56 56
          * Checking if user have permissions to save information
57 57
          */
58  
-        if ($this->_isAllowedAction('save')) {
  58
+        if ($this->_isAllowedAction('Mage_Cms::save')) {
59 59
             $isElementDisabled = false;
60 60
         } else {
61 61
             $isElementDisabled = true;
@@ -143,11 +143,11 @@ public function isHidden()
143 143
     /**
144 144
      * Check permission for passed action
145 145
      *
146  
-     * @param string $action
  146
+     * @param string $resourceId
147 147
      * @return bool
148 148
      */
149  
-    protected function _isAllowedAction($action)
  149
+    protected function _isAllowedAction($resourceId)
150 150
     {
151  
-        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
  151
+        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed($resourceId);
152 152
     }
153 153
 }
8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php
@@ -38,7 +38,7 @@ protected function _prepareForm()
38 38
         /*
39 39
          * Checking if user have permissions to save information
40 40
          */
41  
-        if ($this->_isAllowedAction('save')) {
  41
+        if ($this->_isAllowedAction('Mage_Cms::save')) {
42 42
             $isElementDisabled = false;
43 43
         } else {
44 44
             $isElementDisabled = true;
@@ -176,11 +176,11 @@ public function isHidden()
176 176
     /**
177 177
      * Check permission for passed action
178 178
      *
179  
-     * @param string $action
  179
+     * @param string $resourceId
180 180
      * @return bool
181 181
      */
182  
-    protected function _isAllowedAction($action)
  182
+    protected function _isAllowedAction($resourceId)
183 183
     {
184  
-        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
  184
+        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed($resourceId);
185 185
     }
186 186
 }
8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php
@@ -44,7 +44,7 @@ protected function _prepareForm()
44 44
         /*
45 45
          * Checking if user have permissions to save information
46 46
          */
47  
-        if ($this->_isAllowedAction('save')) {
  47
+        if ($this->_isAllowedAction('Mage_Cms::save')) {
48 48
             $isElementDisabled = false;
49 49
         } else {
50 50
             $isElementDisabled = true;
@@ -167,11 +167,11 @@ public function isHidden()
167 167
     /**
168 168
      * Check permission for passed action
169 169
      *
170  
-     * @param string $action
  170
+     * @param string $resourceId
171 171
      * @return bool
172 172
      */
173  
-    protected function _isAllowedAction($action)
  173
+    protected function _isAllowedAction($resourceId)
174 174
     {
175  
-        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
  175
+        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed($resourceId);
176 176
     }
177 177
 }
8  app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php
@@ -45,7 +45,7 @@ protected function _prepareForm()
45 45
         /*
46 46
          * Checking if user have permissions to save information
47 47
          */
48  
-        if ($this->_isAllowedAction('save')) {
  48
+        if ($this->_isAllowedAction('Mage_Cms::save')) {
49 49
             $isElementDisabled = false;
50 50
         } else {
51 51
             $isElementDisabled = true;
@@ -125,11 +125,11 @@ public function isHidden()
125 125
     /**
126 126
      * Check permission for passed action
127 127
      *
128  
-     * @param string $action
  128
+     * @param string $resourceId
129 129
      * @return bool
130 130
      */
131  
-    protected function _isAllowedAction($action)
  131
+    protected function _isAllowedAction($resourceId)
132 132
     {
133  
-        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('cms/page/' . $action);
  133
+        return Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed($resourceId);
134 134
     }
135 135
 }
2  app/code/core/Mage/Adminhtml/Block/Customer/Edit.php
@@ -39,7 +39,7 @@ public function __construct()
39 39
         $this->_controller = 'customer';
40 40
 
41 41
         if ($this->getCustomerId() &&
42  
-            Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('sales/order/actions/create')) {
  42
+            Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Sales::create')) {
43 43
             $this->_addButton('order', array(
44 44
                 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Create Order'),
45 45
                 'onclick' => 'setLocation(\'' . $this->getCreateOrderUrl() . '\')',
8  app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php
@@ -71,7 +71,7 @@ protected function _beforeToHtml()
71 71
 
72 72
         if (Mage::registry('current_customer')->getId()) {
73 73
 
74  
-            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('sales/order/actions/view')) {
  74
+            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Sales::actions_view')) {
75 75
                 $this->addTab('orders', array(
76 76
                     'label'     => Mage::helper('Mage_Customer_Helper_Data')->__('Orders'),
77 77
                     'class'     => 'ajax',
@@ -91,7 +91,7 @@ protected function _beforeToHtml()
91 91
                 'url'       => $this->getUrl('*/*/wishlist', array('_current' => true)),
92 92
             ));
93 93
 
94  
-            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('newsletter/subscriber')) {
  94
+            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Newsletter::subscriber')) {
95 95
                 $this->addTab('newsletter', array(
96 96
                     'label'     => Mage::helper('Mage_Customer_Helper_Data')->__('Newsletter'),
97 97
                     'content'   => $this->getLayout()
@@ -99,7 +99,7 @@ protected function _beforeToHtml()
99 99
                 ));
100 100
             }
101 101
 
102  
-            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/reviews_ratings')) {
  102
+            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Review::reviews_ratings')) {
103 103
                 $this->addTab('reviews', array(
104 104
                     'label'     => Mage::helper('Mage_Customer_Helper_Data')->__('Product Reviews'),
105 105
                     'class'     => 'ajax',
@@ -107,7 +107,7 @@ protected function _beforeToHtml()
107 107
                 ));
108 108
             }
109 109
 
110  
-            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('catalog/tag')) {
  110
+            if (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Tag::tag')) {
111 111
                 $this->addTab('tags', array(
112 112
                     'label'     => Mage::helper('Mage_Customer_Helper_Data')->__('Product Tags'),
113 113
                     'class'     => 'ajax',
2  app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php
@@ -160,7 +160,7 @@ protected function _prepareColumns()
160 160
      */
161 161
     public function getRowUrl($row)
162 162
     {
163  
-        return (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('customer/manage') && $row->getCustomerId())
  163
+        return (Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('Mage_Customer::manage') && $row->getCustomerId())
164 164
             ? $this->getUrl('*/customer/edit', array('id' => $row->getCustomerId())) : '';
165 165
     }
166 166
 }
3  app/code/core/Mage/Adminhtml/Block/Notification/Survey.php
@@ -42,7 +42,8 @@ public function canShow()
42 42
     {
43 43
         $adminSession = Mage::getSingleton('Mage_Backend_Model_Auth_Session');
44 44
         $seconds = intval(date('s', time()));
45  
-        if ($adminSession->getHideSurveyQuestion() || !$adminSession->isAllowed('all')
  45
+        if ($adminSession->getHideSurveyQuestion()
  46
+            || !$adminSession->isAllowed(Mage_Backend_Model_Acl_Config::ACL_RESOURCE_ALL)
46 47
             || Mage_AdminNotification_Model_Survey::isSurveyViewed()
47 48
             || !Mage_AdminNotification_Model_Survey::isSurveyUrlValid())
48 49
         {
2  app/code/core/Mage/Adminhtml/Block/Notification/Window.php
@@ -173,6 +173,6 @@ public function getSeverityText()
173 173
     protected function _isAllowed()
174 174
     {
175 175
         return Mage::getSingleton('Mage_Backend_Model_Auth_Session')
176  
-            ->isAllowed('admin/system/adminnotification/show_toolbar');
  176
+            ->isAllowed('Mage_AdminNotification::show_toolbar');
177 177
     }
178 178
 }
4  app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php
@@ -144,7 +144,9 @@ protected function _prepareMassaction()
144 144
 
145 145
     public function getRowUrl($row)
146 146
     {
147  
-        if (!Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('sales/order/creditmemo')) {
  147
+        if (!Mage::getSingleton('Mage_Backend_Model_Auth_Session')
  148
+            ->isAllowed(Mage_Backend_Model_Acl_Config::ACL_RESOURCE_ALL)
  149
+        ) {
148 150
             return false;
149 151
         }
150 152
 
4  app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
@@ -145,7 +145,9 @@ protected function _prepareMassaction()
145 145
 
146 146
     public function getRowUrl($row)
147 147
     {
148  
-        if (!Mage::getSingleton('Mage_Backend_Model_Auth_Session')->isAllowed('sales/order/invoice')) {
  148
+        if (!Mage::getSingleton('Mage_Backend_Model_Auth_Session')
  149
+            ->isAllowed(Mage_Backend_Model_Acl_Config::ACL_RESOURCE_ALL)
  150
+        ) {
149 151
             return false;
150 152
         }
151