Hide CiviCRM navigation menu based on permission
There's a CiviCRM navigation hook that you could use in an extension but...

To me this is the wrong approach. Hiding the menu does not stop users from accessing those pages or using the API via JavaScript.