Can I hide the Dashboard from Anonymous Users?

I've set up Confluence (in Documentation Theme) so Anonymous Users go right to a Home Page, but they still can click on Dashboard in the breadcrumbs. There's nothing in the Dashboard that we want our customers to see.

Thanks,

Dan

5 answers

1 accepted

1 vote
Accepted answer

Hi Remo,

I installed the Visibility plug-in, but the only way I know to get to any macro (such as show-to and hide-from) is by going into the Edit mode, which of course I can't get to on the Dashboard.

So I don't understand how these macros will help me hide the Dashboard.

Thanks, Dan

Hi Dan

You can use the visibility macros also outside the editor, for example in the layout of the dashboard (Confluence Admin => Layouts => Global Layout) to specifically hide/show certain elements to certain users/groups.

If you just want to hide the whole dashboard for anonymous users, you could use the visibility macros in combination with the redirect plugin to redirect them to your home page. Insert the following code into your sites welcome message (Confluence Admin => General Configuration => Site Welcome Message):

{hide-from:group=confluence-users}
  {redirect:public:Home}
{hide-from}

(this code redirects all users that are not in the group "confluence-users" to page "Home" in space "public")

Hope this helps

3 votes
David Simpson Community Champion Nov 15, 2011

Hide the Dashboard link with a little JavaScript...

Browse to Confluence Admin | Look & Feel | Custom HTML

Paste this into At the End of the HEAD:

<script>
AJS.toInit(function(){
  if (AJS.params.remoteUser == ''){
    AJS.$('#breadcrumbs li:first').remove(); // remove the dashboard link
    AJS.$('#breadcrumbs li:first').addClass('first'); // remove the pointer before the next link
  }
});
</script>

David - Is there anything else to do? I can't seem to get the Jscript to work... (did this require the Visibility plugin?)

Any issue with a pre-4.x version of Confluence that you can think of?

Thank!

You could use the show-to or hide-from macros contained in the Visibility plugin.

To show content only for logged in users:

{show-to:group=confluence-users}
Congratulations, you logged in!
{show-to}

To show content to anonymous users:

{hide-from:group=confluence-users}
You are not logged in - Please login.
{hide-from}

Hope this helps

Hi David - I encountered the same result as Henry W.

Hi Remo - I haven't tried the plug-in yet, but thanks.

Hi Remo,

Thank you, that works great!

I installed the Redirect Plug-in, entered the code in the Welcome Message, and now our anonymous users are redirected to our Home page if they happen to click on the Dashboard link.

(I've never been able to get to Global Layouts - I assume because we use the Documentation Theme.)

I very much appreciate your advice and solutions!

Dan

Only downside on this (imho) is that the users might experience a short 'wait while we transfer you to the actuel page you want to go' moment. Besides that, it's a nice option.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,066 views 16 14
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