-
-
Notifications
You must be signed in to change notification settings - Fork 814
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 check for financial acls to look for setting rather than sub-key of non-standard civicontribute_settings' setting #13150
Conversation
(Standard links)
|
…of non-standard civicontribute_settings' setting
af12693
to
2fc43bb
Compare
@eileenmcnaughton if @monishdeb isn't able to test what would you propose would be the way forward with this one |
@seamuslee001 I'm pretty confident - it's similar to what we did with other half-mangled settings for the rc & I've checked locally |
$contributeSettings = Civi::settings()->get('contribution_invoice_settings'); | ||
if (CRM_Utils_Array::value('acl_financial_type', $contributeSettings)) { | ||
\Civi::$statics[__CLASS__]['is_acl_enabled'] = TRUE; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm
\Civi::$statics[__CLASS__]['is_acl_enabled'] = Civi::settings()->get('acl_financial_type') ?: CRM_Utils_Array::value('acl_financial_type', Civi::settings()->get('contribution_invoice_settings'), FALSE);
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess so but I kinda wanted to parse out the bit that should be deprecated / removed
Sorry for the delay, agree with the patch BUT how about that one-liner? |
@monishdeb re the one-liner - I actually want to deprecate that handling for the 'not really set' & leaving it as an add on makes it easier to strip out. I'm going to go ahead & merge this since you agree in principle & I want regressions in the rc fixed asap - We can tweak further in master but as @mattwire suggested actually transforming the settings makes sense |
Overview
Fixes an intra-rc regression where setting for financial acl was not being picked up
Before
Newly enabled financial acls ignored
After
Acls picked up
Technical Details
Some true awfulness was introduced in contribution settings a while ago. Some settings were declared as settings and settable via the api - but only worked when saved to 'the wrong place' via the preferences form munging them into a non-standard setting key. This now picks up either place.
As @mattwire commented - perhaps we would be better to update all the saved settings on upgrade....
Comments
@monishdeb can you test this with your financial acls stuff - I picked it up trying out something on them