Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#487 Menu cleanup in preparation for switch to SmartMenus library #13084

Merged
merged 2 commits into from
Nov 15, 2018

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Nov 13, 2018

Overview

Code tweaks and cleanup to support the new SmartMenus based extension. Should have no impact otherwise.

Before

Messier code.

After

Cleaner code. No impact to existing sites.

Technical Details

  • Add a couple client side variables
  • Fix access to functions that were private for no reason
  • Extract permissions check into its own function
  • Fire crmLoad event when menu loads

See https://lab.civicrm.org/dev/core/issues/487

- Add a couple client side variables
- Fix access to functions that were private for no reason
- Extract permissions check into its own function
- Fire crmLoad event when menu loads
@civibot
Copy link

civibot bot commented Nov 13, 2018

(Standard links)

@civibot civibot bot added the 5.8 label Nov 13, 2018
@colemanw
Copy link
Member Author

@monishdeb please review (for NYSS).

@colemanw colemanw changed the title Menu code cleanup in preparation for switch to SmartMenus library dev/core#487 Menu cleanup in preparation for switch to SmartMenus library Nov 13, 2018
@eileenmcnaughton
Copy link
Contributor

I had some doubts about this going into 5.8 but there is some related stuff already merged which makes it kinda make sense to include. I discussed with @colemanw & tipped the balance by adding tests so I'm OK with it

@monishdeb
Copy link
Member

I have tested the patch on all four CMSs (D8, D7, Joomla and Wordpress) esp. on menu build and its behaviour on permissions, and it worked like a charm. Rest assure, theres no intended regression due to the necessary cleanup change. Furthermore, added UT ensure that the new function CRM_Core_BAO_Navigation::checkPermission($menuItem) correctly access the permission of a menu item basis of different criteria:

  1. w/o OR operator
  2. Enabled/Disabled components
  3. Permssion check

Thanks @colemanw for your work.

@lcdservices @eileenmcnaughton I am merging this PR on basis of:

@monishdeb monishdeb merged commit 184779f into civicrm:5.8 Nov 15, 2018
@eileenmcnaughton eileenmcnaughton deleted the menuCleanup branch November 15, 2018 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants