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

AclHelper: ensure $owners can be json_serialized to an array #1075

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

luigi-belli
Copy link

Tested on OroCRM 4.2 and PHP 8.
Currently, when using ElasticSearch as a search engine, queries that contain an ACL ownership condition are generated incorrectly.
E.g.: this fragment:
... {"terms":{"oro_email_campaign_owner":{"0":76,"1":1,"2":2,"3":3 ...
Should instead be serialized as:
... {"terms":{"oro_email_campaign_owner":[76, 1, 2, 3 ....
This leads to ES rejecting the query because of a syntax error.

This PR ensures that the owner array is not keyed with strings, thus being wrongly json_serialized while producing an ES query.

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

Successfully merging this pull request may close these issues.

1 participant