Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Removing "Log In" from a Space in Confluence 4

Alan Bowman
Contributor
September 25, 2011

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
Answer accepted
David at David Simpson Apps
Atlassian Partner
September 26, 2011

This script works for the "Demonstration Space" (which has a spaceKey of "ds") that ships with 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 &amp; browse menu
    }
  });
</script>

Then Save.

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

Alan Bowman
Contributor
September 26, 2011

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 at David Simpson Apps
Atlassian Partner
September 26, 2011

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

-- Cheers, David

Alan Bowman
Contributor
September 26, 2011

David,

That worked also. Many thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events