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

Move financial acl warning from FinancialType BAO to extension. #19283

Merged
merged 1 commit into from
Dec 31, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Dec 29, 2020

Overview

Move financial acl warning from FinancialType BAO to extension.

Before

When renaming a financial type a warning is saved in the session to indicate that it may invalidate existing financial acls (if enabled). This is in the FinancialType BAO. It does not work via the api.

After

Code moved to the financial acls extension as a pre hook, works via the api too.

Technical Details

It turns out this is not currently triggered by the api as the api passes in the key FinancialType in
ids and it is looking for financialType. This is actually fixed in this PR
Setting in the session as currently sometimes works makes sense (at least enough to
move rather than remove).

Also I had to add pre & post hooks for this. As part of our rationalise-to-create push I put this in a new create function & commented the intent to deprecate & remove add. There are a few existing calls to add but mostly in unit tests - one is fixed in #19282

Comments

@civibot
Copy link

civibot bot commented Dec 29, 2020

(Standard links)

@civibot civibot bot added the master label Dec 29, 2020
It turns out this is not currently triggered by the api as the api passes in the key FinancialType in
ids and it is looking for financialType. Regardless I think this makes sense in the extension
and setting in the session as currently sometimes works makes sense (at least enough to
move rather than remove)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants