Have a question about CiviCRM? Get it answered quickly at the new CiviCRM Stack Exchange Q+A siteThis forum was archived on 25 November 2017. Learn more.How to get involved.What to do if you think you've found a bug.
resetNavigation is a fairly heavy duty function and should be sparingly used, IMO.We should find and figure out when permissions change instead of doing it on user login. will definitely have a performance impact for medium - large siteslobo
yes, thats my point. purging and rebuilding the cache is expensiveuser login is cheap and happens multiple times a day (for a medium sized site). Doing so on every user login is a recipe for trouble lobo
I dug extensively, and it doesn't look like Joomla currently has an event triggered when permissions are changed for groups. So the most reliable way to address this is during login. Lobo -- I understand the concern about expense, but we can pass the contact ID, so it only needs to rebuild the navigation cache for a single contact, which in my testing, has no perceivable load impact.nant -- would be good if you can test and confirm. Here is the revised plugin:http://paste2.org/p/2338924
how did I test what -- the absence of an event trigger? I searched through the code. no event is triggered in com_config when ACL perms are updated. there's probably some dispatch/rendering events triggered, but those aren't "properly" what I would want to work off.of course, if you find an event that I missed, feel free to say so. but I don't think triggering off login will have enough performance impact that we really need to worry about it.
we've had some conversation in the Joomla dev list and determined that there is no existing event triggered at the interface where permissions are saved. the Joomla team agrees there really should be an event triggered, so that may make it into a future version.for now, our best solution is to trigger on admin login.I filed a Jira issue with a patch here: http://issues.civicrm.org/jira/browse/CRM-11091