Can I hide the Dashboard from Anonymous Users?
Asked by Dan Moran:

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


Answers:
author: Dan Moran
body: 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

comments: author: Remo Siegwart
body: 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](https://www.adaptavist.com/display/AtlassianConfluence/hide-from+macro) in combination with [the redirect plugin](https://plugins.atlassian.com/plugin/details/183) 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


author: David at David Simpson Apps
body: 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**:

```
&lt;script&gt;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  }});&lt;/script&gt;
```

comments: author: Henry Wilkinson
body: 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!


author: Remo Siegwart
body: You could use the [show-to](https://www.adaptavist.com/display/AtlassianConfluence/show-to+macro) or [hide-from](https://www.adaptavist.com/display/AtlassianConfluence/hide-from+macro) macros contained in the [Visibility plugin](https://plugins.atlassian.com/plugin/details/202).

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


author: Dan Moran
body: 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

comments: author: Edwin Stol
body: 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.


author: Dan Moran
body: Hi David - I encountered the same result as Henry W.

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