I want to hide the "People" tab from the sidebar. Is it possible to do it for other users (Roles)?

Muhammad Hamza February 23, 2020

I want to hide the "People" tab from the sidebar. Is it possible to do it for other users based on their specified roles?

1 answer

0 votes
Mariana Aires February 24, 2020

It is possible.
To hide the "people" tab you have to use a piece of code like:

<script type="text/javascript">
AJS.toInit(function(){
AJS.$('#people-directory-link').hide();});
</script>

Now to determine which users to show it to, use this page as reference: https://confluence.atlassian.com/confkb/how-to-display-different-appearance-for-different-users-using-confluence-layouts-296911031.html 

But a full example would be:

#if ($helper.action.remoteUser) 
    <script type="text/javascript">
      AJS.toInit(function(){
        AJS.$('#people-directory-link').hide();});
    </script>
#else
#end

This hides the people tab for anonymous users.

Suggest an answer

Log in or Sign up to answer