Forum Discussion

alandarr's avatar
alandarr
Brass Contributor
May 26, 2020
Solved

Hiding links for users without access

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!

14 Replies

  • 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. 

    • alandarr's avatar
      alandarr
      Brass Contributor

      Thanks Martin-Coupal.

      I will look into that. Sometimes you just have to look at something from a different perspective!

  • alandarr's avatar
    alandarr
    Brass Contributor

    PeterRising jcgonzalezmartin 

    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-2020/ba-p/1350523 

    And here's a link with more details:
    https://support.office.com/en-us/article/overview-of-audience-targeting-in-modern-sharepoint-sites-68113d1b-be99-4d4c-a61c-73b087f48a81 

    • alandarr 

       

      I cannot speak for jcgonzalezmartin, 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. :smile:

    • Rob Nicholson's avatar
      Rob Nicholson
      Brass Contributor

      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.

       

    • The other way is a custom navigation implemented through a SPFx extension...by the way not a fan here of enabling publishing on modern sites
      • Rob Nicholson's avatar
        Rob Nicholson
        Brass Contributor
        >The other way is a custom navigation implemented through a SPFx extension...

        Any reference material on these? Never used them.

Resources