How to Restrict Users from Accessing People Directory or Search Users from Quick Search
Atlassian Support Offerings
The following approaches are considered Confluence customization that is beyond Atlassian Support Offerings. Atlassian will not be held liable for any errors or other unexpected events resulting from the use of the customization.
Hiding People Directory
You may apply the following steps to prevent users from accessing user information due to confidentiality.
- Access Confluence Admin or click the Cog icon, and choose General Configuration.
- Go to Look and Feel panel and click Layouts.
- Under the Site Layouts, search for Main Layout and click Edit/Create Custom.
- Find the following section:
<head>
and</head>
. Copy and paste the following code before
</head>
.#if ($userAccessor.hasMembership('<insert-group-with-access>', $helper.action.remoteUser.name)) #else <script type="text/javascript"> AJS.toInit(function(){ AJS.$('#people-directory-link').hide(); }); </script> #end
Save the changes.
Please replace the code: "<insert-group-with-access>" with the group that allowed to access the People Directory (i.e. confluence-administrators
).
Hiding Quick Search
User is still able to access the user information by searching the user in the Quick Search bar. Therefore, Quick Search bar is required to hide as well
- Access Confluence Admin or click the Cog icon, and choose General Configuration.
- Go to Look and Feel panel and click Layouts.
- Under the Site Layouts, search for Main Layout and click Edit/Create Custom.
- Find the following section:
<head>
and</head>
. Copy and paste the following code before
</head>
.#if ($userAccessor.hasMembership('<insert-group-with-access>', $helper.action.remoteUser.name)) #else <script type="text/javascript"> AJS.toInit(function(){ AJS.$('#quick-search-query').hide(); }); </script> #end
Insert the following code:
AJS.$('#quick-search-query').hide();
into the body if you have already apply the previous code.Save the changes.
Please replace the code: "<insert-group-with-access>" with the group that allowed to access the People Directory (i.e. confluence-administrators
).
There is an improvement request raised at CONF-7837 - Getting issue details... STATUS .