05-26-2020 09:42 AM
05-26-2020 09:42 AM
I am trying to figure out how to hide links in the Top Bar navigation for users that do not have access to something. I find it strange that I don't get many search results in Google that even discuss it.
My structure is Hub Site with a Communication Site that has several subsites. The top Bar navigation (starting at the Hub) contains links to the various subsites. Not all users have access to these sites but the links still show up for them. After doing a little research, these links are in fact hard coded, which is a big part of the problem.
My tenant does not yet have the Audience Targeting option for navigation which appears to be rolling out soon. At this point, I have not enabled the SharePoint Server Publishing Infrastructure at the Communication site. I'm not entirely sure I want to do that based on what I've read. By enabling this feature, would it give me options to hide those links?
I'm really new to SP and not sure if I want to complicate matters by enabling SharePoint Server Publishing Infrastructure. Maybe I need this and just don't realize it yet.
05-26-2020 10:55 AMSolution
Hi, The feature you are looking for is called security trimming, and you are correct in that if you want to make use of this then you will need to enable the publishing feature. So it's a bit of a trade off i'm afraid. You can read more about the options here - https://docs.microsoft.com/en-us/office365/enterprise/navigation-options-for-sharepoint-online
05-26-2020 11:42 AM
05-26-2020 12:39 PM - edited 05-26-2020 12:53 PM
05-26-2020 01:04 PM
I cannot speak for @Juan Carlos González Martín, but my own personal feeling is that the publishing features have always been available with the classic SP sites in mind as opposed to the modern ones. Initially, the publishing features were made available in modern sites with a view to migrating older classic sites into a modern site in a sort of coexistence. They were never really meant for modern sites though, and modern sites have way more options to look professional out of the box without having to rely on the publishing features.
I also feel that (personal opinion again), that as long as users cannot access content they don't have permissions for, then all is good. Security trimming for me is a nice to have, not really a make or break feature though.
05-26-2020 01:12 PM
05-26-2020 01:33 PM - edited 05-26-2020 01:34 PM
Thank you both for that insight. I didn't realize that it was really a sort of migration feature. But there is still the issue of hiding menu items. For now, a user can see the link but they are presented with the "ask for permission to access this site" message and a way to send a note to the owner of a site.
I guess the new "Audience Targeting" feature will be the answer. Evidently it's rolling out already, but I have not seen it in our tennant yet and I am not sure we will. I was aware of it prior to my question, but really wanted opinions on the Publishing option pros and cons. Thank you both for your input! I'm glad I asked before enabling the Publishing feature!
Audience Targeting was recently discussed here:
And here's a link with more details: