Removing "Log In" from a Space in Confluence 4

Hello,

I'm wondering how to remove the "Log In" link from a Space in Confluence 4. I'm setting up a customer facing knowledgebase, which is read or view only. We do not want the customers to log in to the knowledgebase (nor can they leave comments). For this Space, I want to remove the Log In link, so that there isn't any confusion in case a customer sees the link and tries to log in. For other Spaces, I want to leave the Log In link visible - I'm also setting up an intranet for our staff, who will need to be able to log in.

Any ideas where this can be configured? I was looking in the Space Admin > Layout > Site Layouts, but nothing there looked like what I wanted. I suspect this is going to be found in the config files on the server itself, which is fine. I am just looking for some pointers or direction before I start mucking about at the CLI.

Thanks,

Alan

1 answer

1 accepted

4 votes
David Simpson Community Champion Sep 26, 2011

This script works for the "Demonstration Space" (which has a spaceKey of "ds") that ships wiith Confluence

Browse to Confluence Admin | Look and Feel | Custom HTML

In At the end of the HEAD, paste:

<script>
  AJS.toInit(function($){
    if (AJS.params.spaceKey == 'ds') { 
      $('#login-link,#browse-menu-link').parent().hide(); // Hide the login & browse menu
    }
  });
</script>

Then Save.

Change the 'ds' bit to whatever the spaceKey is for your space.

David,

That worked perfectly, thank you. One last question - I want to do the same with the "Browse" link. I tried to add in another script under the one that hides the "Log In", but it's not working. I suspect this is because I don't know the proper name for "Browse". Do you know what that would be, or at least know where I could look for it?

Thanks,

Alan

David Simpson Community Champion Sep 26, 2011

Alan, I've updated the answer to include removal of the "Browse" menu too.

-- Cheers, David

David,

That worked also. Many thanks.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,777 views 25 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you