cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Repository Browser

sebastian1
Champ on-the-rise
Champ on-the-rise
Hi!

Is it possible to hide the Reporitory Browser for non admin users?

Sebastian
18 REPLIES 18

mikeh
Star Contributor
Star Contributor
You can hide it complete pre-3.4 using the following custom config:
<alfresco-config>

   <!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>false</visible>
   </config>

</alfresco-config>
Note the URL /share/page/repository will still work, but it won't be visible.

In 3.4 you can simply add permission="admin" to the header item via custom config.

Thanks,
Mike

sebastian1
Champ on-the-rise
Champ on-the-rise
Thanks Mike!

I know the share config file.

But I Need the Button to be visible for Admin Users only!

Your Workaround hides the Button for every User on the System.
I use it for setting permissions on the Folders and Documents.

mikeh
Star Contributor
Star Contributor
So just bookmark it  Smiley Happy

sebastian1
Champ on-the-rise
Champ on-the-rise
Yeah, that might be the easiest way to achiev this goal?

But isn't there any other way.
Like the Same way, the Admin console Button is hidden for non admin?

mikeh
Star Contributor
Star Contributor
Sure, take a look inside header.get.html.ftl for the user.isAdmin check.

Thanks,
Mike

sebastian1
Champ on-the-rise
Champ on-the-rise
Okay, thanks Mike. That worked!
I set the repository to true. Then I limited the access for admins only in the Header.get.html.ftl file

share-config-custom.xml


<!– Repository Library config section –>
   <config evaluator="string-compare" condition="RepositoryLibrary" replace="true">
      <!–
         Whether the link to the Repository Library appears in the header component or not.
      –>
      <visible>true</visible>


Header.get.html.ftl


<#if user.isAdmin>       
<#if repoLibraryVisible>
<span class="menu-item-icon repository"><a href="${url.context}/page/repository">${msg("link.repository")}</a></span>
</#if>
</#if>

vitl
Champ in-the-making
Champ in-the-making
In 3.4 you can simply add permission="admin" to the header item via custom config.

Thanks,
Mike

Hi Mike,

Can you provide more details on this please?

Thanks

mikeh
Star Contributor
Star Contributor
Hi Mike,

Can you provide more details on this please?

Thanks
Sorry for the delay. The Share Header wiki page is now live: http://wiki.alfresco.com/wiki/Share_Header

Thanks,
Mike

wasca
Champ in-the-making
Champ in-the-making
I figured out how to hide the repository link from non-admin users

open this file

/opt/alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/share-config.xml

find this line within the <header> tags
<item type="link" id="repository">/repository</item>

Change to
<item type="link" id="repository" permission="admin">/repository</item>

Reload Alfresco. now only admin users will see that link