I am developing a contract that extends both UUPSUpgradeable and AccessManaged. I would like to restrict access to the upgrade function by overriding _authorizeUpgrade like so:
function _authorizeUpgrade(address) internal override restricted {}
However, the documentation explicitly recommends against the use of restricted on internal functions:
The
restrictedmodifier should never be used oninternalfunctions, judiciously used inpublicfunctions, and ideally only used inexternalfunctions.
Are any recommendations or best practices for restricting access to _authorizeUpgrade in an AccessManaged contract? As far as I can tell, using restricted here DOES have the desired effect, but I would like to make sure that this is okay to do given the warnings in the documentation above.