I have a table listing Companies. Some of them can be displayed on our intranet, some others are to be available only to the corporate staff.
By default, Companies page shows all the records but I have set a "Visible YES/NO" field so that I can enter Companies in the database while controlling their visibilty. But it only works because I have access to the admin page of the app. This "Visible" criterion sounds quite artificial.
I would like to use the user roles so that there are two different views of my Companies listing.
Someone who is not logged should be able to see all the "unrestricted" companies. Someone logged in could see the additional companies AND the public companies.
So far, I have seen methods to see your own records, but I don't want the company visibility to be based on a unique user basis, but that someone with the proper role could see the "hidden" companies + the usual ones.