We are using an older version of Confluence - 3.4.3, and I am using the "Intranet Theme". For anonymous users, we would like to hide the Tools menu. What is the simpilest way to accomplish this?
Community moderators have prevented the ability to post new answers.
You can add JS to Confluence Admin > Custom HTML > At the end of the HEAD
AJS.toInit(function(){ if (AJS.params.remoteUser == ''){ AJS.$('#action-menu-link').hide(); } });
https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence
Thank you so much for the links, and the JS code. I added the following to the end of the HEAD section, and it still shows the "Tools" menu to anonymous users:
<script type="text/javascript"> AJS.toInit(function(){ if (AJS.params.remoteUser == ''){ AJS.$('#browse-menu-link').hide(); } }); </script>
This is Confluence 3.4.3 - is it too old to work with this JS?
Is there another way to do this?
Many thanks,
Bruce
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi - I think I figured it out - 3.4.3 must not be passing the loggedIn user, because when I went to the console, and issued a
AJS.params
none of the vars had the logged in user. No big deal, because for this space, it's mostly view only by anonymous users, so I am just grabbing the 'spaceKey=XXX' and removing the menus that way.
Thanks again so much for heading me in the right direction! Very valuble information!
Many thanks,
Bruce
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
great finding :) glad that it works now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.