Is it possible to control what an anonymous user sees in the browse menu?

Ideally, I'd like to be able to hide the entire browse menu from anonymous users, but if that's not possible, can I control what's shown on the browse menu to anonymous users?

6 answers

1 accepted

This widget could not be displayed.
David Simpson Community Champion Aug 01, 2011

Browse to:

Confluence Admin | Look and Feel | Custom HTML 

In At end of the HEAD, add some javascript similar to this:

<script>
if (AJS.$('#login-link').length > 0) {
AJS.$('#browse-menu-link').parent().hide();
}
<script>

Thank you so much David!

This is the script I ended up using and I had to put it at the end of the body section.

<script>

if (AJS.$('#login-link').is(":visible"))

{

AJS.$('#space-pages-link').hide();

AJS.$('#space-blogposts-link').hide();

AJS.$('#space-attachments-link').hide();

AJS.$('#space-mail-link').hide();

AJS.$('#space-advanced-link').hide();

AJS.$('#whats-new-menu-link').hide();

AJS.$('#gadget-directory-link').hide();

}

</script>

David Simpson Community Champion Aug 07, 2011

Cool. That will likely do the trick :)

This widget could not be displayed.
David Simpson Community Champion Aug 01, 2011
This widget could not be displayed.

There is also the excellent Menu Manager Plugin from CustomWare that does the trick brilliantly. https://plugins.atlassian.com/plugin/details/13460

But remember, once you have hidden the commands, the user can still access many of the Confluence features by the URL as definined in this great post http://www.divingintothedetails.com/confluence/urls-to-access-confluence-wiki-functionality/. but most of these do require the confluence pageid.

This widget could not be displayed.

I was able to combine the two above answers and make it work in Confluence 4.2.

I put this script at the End of Body

<script>
if (AJS.$('#login-link').is(":visible")) {
    AJS.$('#browse-menu-link').parent().hide();
}
</script> 
This widget could not be displayed.

None of the above will work for OnDemand. Any other ideas?

This widget could not be displayed.

My worry is, if you run these scripts, you will lose the edit menu too and be locked out. Any plan for that scenario?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

108 views 12 6
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