May 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.
Thanks!
May 26 2020 10:55 AM
Solution
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
May 26 2020 11:42 AM
May 26 2020 12:07 PM
May 26 2020 12:23 PM
@Juan Carlos González MartínWould you mind saying a bit more about why you don't care for publishing on Modern sites? Thanks!
May 26 2020 12:39 PM - edited May 26 2020 12:53 PM
@Juan Carlos González Martín @PeterRising
Thanks for the info. I am also wondering, along with @Cindy Zalme why you would not suggest the Publishing option. I am hesitant to enable it, but I may be missing something if I don't.
May 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.
May 26 2020 01:12 PM
May 26 2020 01:33 PM - edited May 26 2020 01:34 PM
@PeterRising @Juan Carlos González Martín
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:
https://techcommunity.microsoft.com/t5/microsoft-sharepoint-blog/sharepoint-roadmap-pitstop-april-20...
And here's a link with more details:
https://support.office.com/en-us/article/overview-of-audience-targeting-in-modern-sharepoint-sites-6...
May 26 2020 05:13 PM
@PeterRisingReally appreciate your taking the time to explain!
May 26 2020 05:13 PM
@Juan Carlos González MartínThanks for taking the time to provide feedback!
May 26 2020 06:31 PM
@alandarr Depending on your requirements, one option could be to create a new site page and add the "Sites" web part. It can display sites attached to the hub and it is also security trimmed. Just link this page in your hub.
May 27 2020 09:10 AM
Thanks @Martin Coupal.
I will look into that. Sometimes you just have to look at something from a different perspective!
Sep 11 2020 07:10 AM
@PeterRising it's a real shame that Office 365 groups don't take part in security trimming :( My client has a blend of classic sites and modern Office 365 groups. They are moving towards the later exclusively but the fact that the link now always appears in quick links is a step backwards.
Sep 11 2020 07:11 AM
May 26 2020 10:55 AM
Solution
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