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

confluence 5 - hide 'space tools' from anonymous user -how

francis
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
July 20, 2013

What's the best way to hide the space tools for anonymous users ?


2 answers

1 accepted

4 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.
July 20, 2013

You can do it with client side Javascript, if that's good enough.

In Confluence Admin | Look & Feel | Custom HTML add in At the end of the HEAD:

<script>
  AJS.toInit(function () {
    if (AJS.params.remoteUser == '') {
      AJS.$('a[href*="spacetools.action"]').parent().hide();
    }
  });
</script>


R Donato
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.
September 1, 2014

Hello,

I tried this in Confluence 5.4.2. But the Space Tools menu still displays for Anonymous users. Is there an adjustment I can do to the script to make it work?

Steven F Behnke
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.
September 3, 2014

Hi @R Donato,

You should ask new questions and reference old ones with links in the future!

To do this via clientside javascript, I modifed David's slightly and this worked for me on Confluence 5.4.4

<script>
  AJS.toInit(function(){
    if (AJS.params.remoteUser == ''){
      AJS.$("#space-tools-menu-trigger").hide();
    }
  });
</script>

R Donato
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 16, 2014

This didn't work in 5.4.2. The Tools menu and all its options still display.

Wilvin Szeto May 6, 2016

Did anyone know how to remove the space tool for the cloud (on-demand) version?

Coline Macorol September 19, 2017

What about removing the space tools for another group of users, like a new group created on the admin configuration side?

0 votes
Gregg Saksefski May 25, 2017

I made this work by using single quote ' rather than double quote "

<script type="text/javascript">
AJS.toInit(function(){
if (AJS.params.remoteUser == ''){
AJS.$('#action-menu-link').hide();
AJS.$('#comments-section').hide();
AJS.$('#space-directory-link').hide();
AJS.$('#space-tools-menu-trigger').hide();
AJS.$('#people-directory-link').hide();
AJS.$('#create-page-button').hide();
}
});
</script>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events