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

Fix cachekey string #15761

Merged
merged 1 commit into from
Nov 7, 2019
Merged

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Fixes obscure bug where no custom fields returned when doing a Contact.get api call with check_permissions=0 where the user would not be able to retrieve them if check_permissions=1

Before

I hit a bug (in a unit test) where a user without permissions to access custom data would do a
check_permissions api call followed by a check_permissions = 0 call. In the second call
custom fields were not returned as the 'available' custom fields had been cached on the first call.

After

Fields reflect check_permissions flag

Technical Details

Just a misconstructed cachekeystring - although I would argue it's the wrong place to apply permissions but that's another day

Comments

I hit a bug (in a unit test) where a user without permissions to access custom data would do a
check_permissions api call followed by a check_permissions = 0 call. In the second call
custom fields were not returned
as they were already excluded from the cached key.
@civibot
Copy link

civibot bot commented Nov 7, 2019

(Standard links)

@civibot civibot bot added the master label Nov 7, 2019
@seamuslee001 seamuslee001 merged commit 9ad2b77 into civicrm:master Nov 7, 2019
@seamuslee001 seamuslee001 deleted the cache_stuffed branch November 7, 2019 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants