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

Terence McGhee July 29, 2011

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

Thank you so much David!

Terence McGhee August 7, 2011

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

Cool. That will likely do the trick :)

0 votes
Stephen Thompson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 18, 2014

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

0 votes
Adrian Wieczorek
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.
February 26, 2014

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

0 votes
Eric Riddle July 5, 2012

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> 
0 votes
Jodie Miners
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.
August 31, 2011

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.

0 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.
August 1, 2011

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events