Make sure IP addresses can be set properly on the network settings screen #367
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the Change
Coming out of some changes we made to show a more thorough message around impacts of caching, ran into an issue where IP addresses weren't saving properly on the network settings screen.
Looking into it, the issue was a call to the
get_ipsmethod, as this will always pull settings from the site level, not network level.Now we could update that method to work properly in both situations but in looking at how we were using this method, it seems we use the output of this to decide if we show a more robust caching message, i.e. if someone has IP addresses they've unrestricted, we then show a more robust message.
Unless I'm missing something here, seems fine to show that message to all users, whether they have IP addresses allowed or not. That fixes the problem here and I don't think there's any downside to showing that extra messaging, though I'm open to feedback here.
How to test the Change
Changelog Entry
Credits
Props @dkotter
Checklist: