Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I hide the Dashboard from Anonymous Users?

Dan Moran November 15, 2011

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
Answer accepted
Dan Moran December 4, 2011

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

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 5, 2011

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 at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
November 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>

Henry Wilkinson November 27, 2011

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!

1 vote
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 15, 2011

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

0 votes
Dan Moran December 5, 2011

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

Edwin Stol July 16, 2012

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.

0 votes
Dan Moran November 30, 2011

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events