What's the best way to hide the space tools for anonymous users ?
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>
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?
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>
This didn't work in 5.4.2. The Tools menu and all its options still display.
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>
It looks like you're new here. Sign in or register to get started.