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

3 votes
Answer accepted
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 :)

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.

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> 

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

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
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

276 views 2 10
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