Revert "Fixed on demand restricting for dangerous methods with whitelists"

This reverts commit 63946e5949ae8112ef1c6952e65317a34bc04625.