Disable Certain Tool Options for Anonymous Users

Talitha Pascual November 17, 2014

Is there a way to hide/ disable the following options from the 'Tools' dropdown menu for anonymous users:

  1. Page History (so they are not able to view previous versions of the page)
  2. Export to Word

 

1 answer

1 accepted

0 votes
Answer accepted
jing_hwa_cheok
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 19, 2014

Hi Talitha,

 

You can put a javascript in the Confluence Admin >> General Configuraton >> Custom HTML  to hide those element.

Here's the javascript to hide those option for annoymous user.

<script type="text/javascript">
    AJS.toInit(function(){
        if (AJS.params.remoteUser == ''){
          AJS.$('#action-view-history-link').hide();
        AJS.$('#action-export-word-link').hide();
        }
    });
</script>

For more detailed explanation regarding the usage of javascript in the Confluence, you may refer to this documentation https://confluence.atlassian.com/display/CONFKB/How+to+Use+JavaScript+in+Confluence.

Hope this helps!


Regards,
Jing Hwa

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events