Hide Login in Confluence Dashboard


How do I hide just the login (at the top right hand corner) in Confluence Dashboard from anonymous users?

Thank you.

6 answers

1 accepted

Accepted Answer
1 vote

Hey Tet, I found the following Custom HTML from another Atlassian Answer that another person created:


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:

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

Then Save.

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


2 votes
Stephen Deutsch Community Champion Aug 13, 2015

This should work:

  AJS.toInit(function() {
    if (AJS.params.remoteUser == '') {

This is the one that worked for me

0 votes
Stephen Deutsch Community Champion Aug 12, 2015

The script that Guilherme linked to will block the login link for a particular space, but not from the dashboard.

This would probably work better:

    if (document.location.href.indexOf("dashboard.action") !== -1) {
      $("#login-link").parent().hide(); // Hide the login menu

Hi Stephen,


I tried your method but it does not work.  Actually I also tried this script which is working but it hides the whole menu bar from anonymous users:


  AJS.toInit(function() {

  if (AJS.params.remoteuser == '') {






How do I modify this script to just hide the login button in the menu bar.  I would like to leave the rest (eg. quick search textbox) visible.

Thank you

Thank you!  It works!

This worked for me as well! 

Thanks! Perfect solve.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Tuesday in Confluence

Introducing Praecipio Consulting, an Atlassian Solution Partner

Hey there Community!  My name is Vannya Vallejo, the Channel Communication Specialist at Atlassian and I want to help Atlassian users like you learn about our Solution Partners and how they c...

348 views 0 9
Read article

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