The main menu on the Alfresco Share app contains a couple of items that the project team for our deployment wants to have disabled. Specifically "My Files" and "Shared Files". Hiding would be good enough, but if we can disable them completely that would be best. Those are functions that the users are not to have any access to. All their interactions should be through the sites.
Is there an Alfresco supported (as in "won't break when we upgrade versions") way to do this?
You have blog post describing how to hide main menu items at this link. It turned out later that this approach wasn't working on versions below 4.2.2. which is the case with your community version (4.2e) too.
You can use workaround described at this link. Below is the exact code you need. At the bottom of share-header.get.js add following
Later you can write extension module when you get this working. Other elements such as HEADER_NAVIGATION_MENU_BAR, HEADER_TITLE_MENU, HEADER_TITLE can be removed from menu using widgetUtils.deleteObjectFromArray helper function. Last option is to use CSS.