Skip to content

Don't hardcode the Magento_Backend::admin index#4396

Merged
mmansoor-magento merged 1 commit intomagento:developfrom
annybs:develop
Aug 21, 2016
Merged

Don't hardcode the Magento_Backend::admin index#4396
mmansoor-magento merged 1 commit intomagento:developfrom
annybs:develop

Conversation

@annybs
Copy link
Copy Markdown
Contributor

@annybs annybs commented May 4, 2016

I encountered a problem with a third party module that specified Magento_Adminhtml::admin (incorrectly, I realise) as its root resource in acl.xml which, lacking a sortOrder, got shuffled to $resources[0] pushing the Magento_Backend::admin resource back to $resources[2]. This resulted in jstree rendering no ACL resources in adminhtml, as the $resource[1] being selected was Magento_Backend::all which has no children.

This could be argued to be an issue with the third party module, but selecting a hard-coded index out of a non-immutable array is problematic regardless, and it's not good that such a small error completely breaks ACL management. I submit this PR to specify the correct resource explicitly in relevant locations, rather than relying on an assumption about the resource array's indices.

@vkublytskyi vkublytskyi added the PS label May 4, 2016
@paliarush paliarush self-assigned this May 5, 2016
@paliarush paliarush changed the title don't hardcode the Magento_Backend::admin index Don't hardcode the Magento_Backend::admin index May 5, 2016
@paliarush
Copy link
Copy Markdown
Contributor

paliarush commented May 5, 2016

@annybs Thank you for contribution. Please fix failing builds and then we can accept your PR.

Internal ticket number MAGETWO-52555.

@paliarush paliarush added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: needs update and removed in progress labels May 5, 2016
@vkorotun vkorotun added Admin Panel improvement and removed PS Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development labels Aug 3, 2016
@sshrewz sshrewz added the linked label Aug 9, 2016
@mmansoor-magento mmansoor-magento merged commit 66d1960 into magento:develop Aug 21, 2016
mmansoor-magento pushed a commit that referenced this pull request Aug 21, 2016
@vkorotun vkorotun added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed linked labels Aug 22, 2016
@Ctucker9233
Copy link
Copy Markdown

Will this fix work for 2.1 as well? If not, when will a 2.1 port occur?

@Ctucker9233
Copy link
Copy Markdown

@mmansoorebay I see this merge wasn't included in 2.1.2. Is it safe to incorporate into a 2.1.2 production environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Progress: accept Progress: needs update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants