Previously there was a way to comment-out a line is a JS file that would allow you to hide the "Organization" link and views. We share and manage access via groups; but when a user is able to access the "Organization" link and view they are able to see things we don't want them too.
How can we restore this kind of limitation?
Esri keeps on changing how you can hide the Organization tab, so it's going to depend what version of ArcGIS Enterprise you're on.
For ArcGIS Enterprise 11.0-11.2, this article will help. At the bottom, it will take you to the Sharing API documentation page. Look for the restrictOrganizationPageToAdmin parameter you can configure.
If you are on 11.3+, then you will need create a member role in Portal and then assign that role to the users you don't want to access the Organization page. Specifically, you will need to disable the Organization website.
No, this still allows you to go to the "Content" page and then see the "My Organization" and see all content that is shared even to groups you are not a member of.
Oh, well that is two different things. When you said "Organization", I thought you meant the literal "Organization" tab at the very top of Portal.
I'll say there must be a misconfiguration in your roles or perhaps a bug with your Portal, because even if you click the "My Organization" tab, it should show only the content that they have access to through groups, OR items shared with the entire Organization or Public.
I tested this just now, where I have a user assigned the default "User" role. I click "My Organization" on the Content page and the only content that I can see are items shared to the entire organization or publicly. But the user cannot see any items shared in groups that the user is not a member of.
For what it's worth, there is a role privilege that will disable the ability for a person to view content shared with the entire organization if that's something you need.