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

Make Access::loadSitesIfNeeded() method protected so UserGroups can override it #8203

Merged
merged 1 commit into from Jun 24, 2015

Conversation

diosmosis
Copy link
Member

In #7641 site access loading was changed to use lazy loading. This causes the UserGroups plugin to break, since it adds/changes access levels in reloadAccess(). To properly change access levels, we have to make the loadSitesIfNeeded() protected.

It's possible to modify access levels w/o this, but that requires calling the getSitesIdWith... methods before changing access, then calling the method again. This is, however, not as performant, since the array_unique/array_merge methods will be called twice.

CC @tsteur Will merge it now, but feel free to let me know if there's an issue.

…d to override access loading behavior. Needed by UserGroups plugin.
@diosmosis diosmosis added the c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. label Jun 24, 2015
@diosmosis diosmosis self-assigned this Jun 24, 2015
@diosmosis diosmosis added this to the 2.14.0 milestone Jun 24, 2015
diosmosis added a commit that referenced this pull request Jun 24, 2015
Make Access::loadSitesIfNeeded() method protected so derived classes can override it
@diosmosis diosmosis merged commit 4ae8946 into master Jun 24, 2015
@diosmosis diosmosis deleted the override_access_fix branch June 24, 2015 11:09
@diosmosis diosmosis added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jun 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant