-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Standardise implementation of financial type acl in query object #28967
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
e7b5984
to
3e7c04b
Compare
@eileenmcnaughton these test fails seem to relate Test Result (2 failures / +2) |
OK - so this changes the behaviour a little status quo
apiv3 & BAO select
This makes them the same ie LineItem get only works if ALL line items on the contribution are accessible & contribution get only retrieves if ALL line items are accessible I think we need to standardize on one of 3 options
The amount of work to go down any of these 3 paths at this point is similar - since 1 is the hardest & it is done in this PR & only requires a test tweak to get it through I do note however that they are not equivalent performance wise. I think the best is to make 1 work / ie edit the tests for it & merge this & then actual users of the extension can tweak to one of the other options if they experience performance issues Note that the goal now is to get this code out of core code to the extension, with the goal being the extension would eventually be community maintained outside of core so I don't want to get into any feature requests here |
3e7c04b
to
9cab235
Compare
Per my last comment I have fixed the test to acknowledge that this PR makes the strict behaviour that was inconsistently applied, consistently applied |
3f5fe05
to
4cb92ef
Compare
This fixes it to call the selectWhere in the BAO_Query, as apiv4 does. There is test cover in the touched test. The primary goal here is to get this logic out of core & to disabled this extension on most sites with a view to moving the whole extension out of core in time
4cb92ef
to
c4d5a9b
Compare
Tested on WP 5.70 single and multisite for both front-end forms and back end access in conjunction with #29369 which effectively does produce the outcome below which appears to be the most comprehensive and preferred option IMO:
I can see how the performance could be quite different looking thru line items and might take the trade off for the 3rd option (assume this will be the fastest) if noticeably different:
|
Yeh I think 1 is probably best and given that this standardised on that seems good. I'm going to get jenkins to re-run again |
Jenkins re test this please |
Overview
Standardise implementation of financial type acl in query object
This fixes it to call the selectWhere in the BAO_Query, as apiv4 does. There is test cover in the touched test.
Before
Financial ACLs applied deep in the query object
After
Applied via the selectWhere hook
Technical Details
The primary goal here is to get this logic out of core & to disable this extension on most sites with a view to moving the whole extension out of core in time - especially as we have just hit an issue with this extension requiring civi-contribution & causing problems with sites that disable civi-contribute
Comments