Replace the use of fWhitelisted by permission checks
Summary:
This is a partial backport of Core PR16248 : https://github.com/bitcoin/bitcoin/pull/16248/commits/d541fa391844f658bd7035659b5b16695733dd56
Depends on D5928
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5932