<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Make options in header 'admin-only' in Alfresco 4.2d in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284015#M237145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You've picked the one part of the header menu that is slightly more complicated to customize! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically you have to do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Create an extension the "share-header.get.js" WebScript JavaScript controller&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Create a new widget that extends "alfresco/header/AlfSitesMenu"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Make the new widget override the "addUsefulGroup" function so that the create site menu item doesn't get added&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) In your extension controller use widgetUtils.findObject to locate the "HEADER_SITES_MENU" widget&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) Modify the definition so that the "name" attribute is set to your custom widget&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6) If you create your custom widget in your own package then you'll need to update the surf.xml to add the root location of your module so that it can be picked as an AMD resource. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason that this example is slightly more complicated (e.g. than say just finding a menu item and removing it) is because the sites menu does a lot of dynamic generation of menu items (e.g. the recent sites and favourite items). However, I can see that I should have included some boolean configuration so that you could toggle which menu items are shown (e.g. the create sites and site finder, etc). Then this would have been much easier. It's obviously too late for me to commit this change to the 4.2d Community release but I can have it in place for Enterprise and the next Community release.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Sep 2013 15:42:14 GMT</pubDate>
    <dc:creator>ddraper</dc:creator>
    <dc:date>2013-09-03T15:42:14Z</dc:date>
    <item>
      <title>Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284010#M237140</link>
      <description>In 4.2c and older, I was able to make Header (sub)items admin-only by enclosing items between &amp;lt;#if user.isAdmin&amp;gt; and &amp;lt;/#if&amp;gt;.For example the Create Site-option was editable like that in: tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/modules/header/sites.get.ht</description>
      <pubDate>Mon, 02 Sep 2013 15:46:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284010#M237140</guid>
      <dc:creator>ebogaard</dc:creator>
      <dc:date>2013-09-02T15:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284011#M237141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The header bar has been re-written for 4.2d using a new approach that we're going to be using throughout Share going forwards. It is still possible to remove the "Repository" link from the header bar using the following configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;config evaluator="string-compare" condition="RepositoryLibrary" replace="true"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;visible&amp;gt;false&amp;lt;/visible&amp;gt;&lt;BR /&gt;&amp;lt;/config&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;…it should be noted that even if the Repository link is removed, it is still accessible via a direct URL and all users (by default) do have read access to Company Home.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is also a legacy mode configuration element for building the new header using the old configuration (although as you've pointed out the layout isn't ideal primarily because of the way in which the "Sites" drop-down menu was written using custom JavaScript). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, the new header menu should be more flexible although perhaps not in your specific example of just wanting to make certain menu items admin only through pure configuration. You can now reconfigure the menu bar via extensions where you identify the widget for each menu item, menu group, menu drop-down or menu bar (and indeed any other widget in the header) and either update it, remove it or add to it. This should make it very easy to customise the menu bar in a way that makes it more resistant to core changes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hopefully you won't find making these changes to arduous although I can see in this case it is probably going to be more work than it was before (and I'm sorry that this is the case) but hopefully you'll be able to see the benefits in the approach we've taken. We're already "eating our own dog food" in this regard as we take the same approach in customizing the header menu for our cloud offering.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have any issues customizing the header bar then please post to the forums and I'll try to help you with the solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Sep 2013 16:16:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284011#M237141</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-02T16:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284012#M237142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dave, thanks for your response. That gives a little more insight.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What would really help, is something like an example or some pointers how to edit/modify one of these menu drop-downs (or are it groups?) and replace the original one with it (as I understand that's how it should be done now), using the web-extensions folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I'm not really sure where to look for the new files that are used by the new header, I hope you can help with that as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And also: it would be rally nice to be able to hide the Repository and Create Site links for non-admins, but show it for admins. Not completely remove them. I know what URL to use, but probably not all admins in the world do &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, in "tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/modules/header/sites.get.html.ftl" I see things like &amp;lt;#if showCreateSite&amp;gt; and &amp;lt;#if showFindSites&amp;gt;. This is what I'd normally use to add an admin-only check. How/where can you configure these switches?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 07:33:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284012#M237142</guid>
      <dc:creator>ebogaard</dc:creator>
      <dc:date>2013-09-03T07:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284013#M237143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're right that I need to get some examples together and I'm hoping to get some blogs done soon but things are a little busy as we're working hard to close out the 4.2 Enterprise release at the moment. You should be able to piece together the information you need for some of my earlier blogs. Effectively what you need to do is build an extension module that targets the "share-header.get" WebScript and create a JavaScript controller extension (&lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2011/08/05/customizing-alfresco-share-javascript-controllers/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/developer/2011/08/05/customizing-alfresco-share-javascript-controllers/&lt;/A&gt;&lt;SPAN&gt;) and use the "widgetUtils.findObject" helper function to locate the widget you want to work with and then either add/remove/modify menu items. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The share-header.get WebScript uses the "share-header.lib.js" file to build the header which you could import and use to build a completely new header if you wanted to completely replace the default "share-header.get" WebScript via the web-extensions folder.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FYI… setting the "visible" element to "false" will only hide the Repository link for non-Admins (which is what you want)… it should actually be like that by default and I've actually committed that fix this morning.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 09:05:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284013#M237143</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-03T09:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284014#M237144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dave, thanks for the additional info.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As I read it, it should be easy to hide the Repository-button for non-admins.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To hide the 'Create Site'-button for non-admins: if I find the time to have a good look at this, I think I can fix myself some extensions/replacements for the Share header.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Erwin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 14:42:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284014#M237144</guid>
      <dc:creator>ebogaard</dc:creator>
      <dc:date>2013-09-03T14:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284015#M237145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You've picked the one part of the header menu that is slightly more complicated to customize! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically you have to do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) Create an extension the "share-header.get.js" WebScript JavaScript controller&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Create a new widget that extends "alfresco/header/AlfSitesMenu"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) Make the new widget override the "addUsefulGroup" function so that the create site menu item doesn't get added&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) In your extension controller use widgetUtils.findObject to locate the "HEADER_SITES_MENU" widget&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5) Modify the definition so that the "name" attribute is set to your custom widget&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;6) If you create your custom widget in your own package then you'll need to update the surf.xml to add the root location of your module so that it can be picked as an AMD resource. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason that this example is slightly more complicated (e.g. than say just finding a menu item and removing it) is because the sites menu does a lot of dynamic generation of menu items (e.g. the recent sites and favourite items). However, I can see that I should have included some boolean configuration so that you could toggle which menu items are shown (e.g. the create sites and site finder, etc). Then this would have been much easier. It's obviously too late for me to commit this change to the 4.2d Community release but I can have it in place for Enterprise and the next Community release.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 15:42:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284015#M237145</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-03T15:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284016#M237146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was a bit embarrassed by this omission so I raised &lt;/SPAN&gt;&lt;A href="https://issues.alfresco.com/jira/browse/ALF-19911" rel="nofollow noopener noreferrer"&gt;https://issues.alfresco.com/jira/browse/ALF-19911&lt;/A&gt;&lt;SPAN&gt; and added some configuration options to make customization easier. Obviously this isn't a lot of use for 4.2d Community but there may yet be another 4.2 community release before 4.2 Enterprise is released.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The updates mean that you can control which elements are displayed by modifying the definition for the "HEADER_SITES_MENU" widget, e.g. the JavaScript controller extension just needs to contain:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;var sitesMenu = widgetUtils.findObject(model.jsonModel.widgets, "id", "HEADER_SITE_CONFIGURATION_DROPDOWN");&lt;BR /&gt;if (sitesMenu)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; sitesMenu.config.showCreateSite = user.isAdmin;&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would result in the create site menu item only being displayed if the current user was the admin. You could do similar things for the Recent Sites group, the Useful group, the favourites controls and the site finder menu item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Sep 2013 16:43:24 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284016#M237146</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-03T16:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284017#M237147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dave, thanks for your enthusiasm and raising a JIRA item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to (easily) implement your fix in 4.2d? Is there a commit # available with all the needed changes? So far, I can't find it in the public SVN.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 09:38:49 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284017#M237147</guid>
      <dc:creator>ebogaard</dc:creator>
      <dc:date>2013-09-04T09:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284018#M237148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The commit I made was revision 54861. The public mirror now appears to be at 54900 so it might have just not caught up at the time you last looked. The path to the file that was changed is this: "/Slingshot/source/web/js/alfresco/header/AlfSitesMenu.js"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 10:11:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284018#M237148</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-04T10:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284019#M237149</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;FYI: Managed to cobble together a first blog on customizing the header: &lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-1/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/developer/2013/09/04/customizing-the-share-header-menu-part-1/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 18:24:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284019#M237149</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-04T18:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284020#M237150</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dave,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have the opposite issue.&amp;nbsp; I *want* the repository to be available to non-admin users.&amp;nbsp; This is because some external WS clients access the files in the&amp;nbsp; user's User Homes/${username} folder and the users want to use /share and view those files.&amp;nbsp; Am I supposed to set legacy-mode-enabled to true so that non-admin users can see the Repository link?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's no legacy-mode-enabled or header block in share-config-custom.xml.sample so I tried a few things.&amp;nbsp; first copy share-config-custom.xml.sample to share-config-custom.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. there's a config/flags block in share-config-custom.xml, so I added legacy-mode-enabled there with setting true.&amp;nbsp; after alfresco restart, non-admins have no Repository link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. I copied the whole share-config.xml into share-config-custom.xml &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; and set legacy-mode-enabled to true in the custom file.&amp;nbsp; no Repository link for non-admins after restart.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. I edited share-config.xml and set legacy-mode-enabled true there.&amp;nbsp; after restart, non-admins DO have the Repository link.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd much prefer to set that in custom config though.&amp;nbsp; What am I missing?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any pointers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Gerald Quimpo&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 22:26:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284020#M237150</guid>
      <dc:creator>bopolissimus</dc:creator>
      <dc:date>2013-09-18T22:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284021#M237151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You should just be able to set the &amp;lt;visible&amp;gt; elememt to true (see earlier comments) then it will be visible for all users (including Admin). You don't need to enable legacy mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 07:17:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284021#M237151</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-19T07:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284022#M237152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks, that worked.&amp;nbsp; It has the same issues as enabling legacy mode (Sites is lower than the other links, link text has spaces replaced by %20), but it works from shared/classes/alfresco/web-extension/share-config-custom.xml :-).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 11:16:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284022#M237152</guid>
      <dc:creator>bopolissimus</dc:creator>
      <dc:date>2013-09-19T11:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284023#M237153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We've seen those issues with legacy mode, and they're being fixed - but thanks for letting us know.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Sep 2013 14:06:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284023#M237153</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-09-19T14:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284024#M237154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dave,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;as 4.2.e is out, which should simplify what I initially wanted, I checked your blogs a second time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The objective is still the same: hiding the CreateSite-option in the Sites-menu.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First I tried to hide the option for all users. So I created the following files:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tomcat/shared/classes/alfresco/web-extension/site-data/extensions/share-header-extensions.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;extension&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;modules&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;Hide Create Site&amp;lt;/id&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;1.0&amp;lt;/version&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customizations&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;customization&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;targetPackageRoot&amp;gt;org.alfresco.share.header&amp;lt;/targetPackageRoot&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sourcePackageRoot&amp;gt;test.hide-create-site&amp;lt;/sourcePackageRoot&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customization&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/customizations&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/modules&amp;gt;&lt;BR /&gt;&amp;lt;/extension&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;tomcat/shared/classes/alfresco/web-extension/site-webscripts/test/hide-create-site/share-header.get.js&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;// Find the "Sites" menu…&lt;BR /&gt;var sitesMenu = widgetUtils.findObject(model.jsonModel, "id", "HEADER_SITES_MENU");&lt;BR /&gt;if (sitesMenu != null)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; // Hide the site finder…&lt;BR /&gt;&amp;nbsp;&amp;nbsp; sitesMenu.config.showCreateSite = false;&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even though I followed your code examples, this doesn't hide the option for admin or non-admin users. What am I doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Only when I set showCreateSite to false in tomcat/webapps/share/js/alfresco/header/AlfSitesMenu-min.js, the option isn't shown anymore.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 14:10:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284024#M237154</guid>
      <dc:creator>ebogaard</dc:creator>
      <dc:date>2013-10-24T14:10:00Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284025#M237155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you download and try the sample JAR linked on &lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2013/09/16/customizing-the-share-header-part-3/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/developer/2013/09/16/customizing-the-share-header-part-3/&lt;/A&gt;&lt;SPAN&gt; ? Although it's hiding the Site Finder (and not create site) if that works then it should be easy to adapt. I've just tried it again on my local environment and it's working for me,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 15:08:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284025#M237155</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-10-24T15:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284026#M237156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To be sure, I tried the JAR from your blog.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;First I put it in tomcat/webapps/share/WEB-INF/lib/, but after a restart the sitefinder was stll there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I also tried tomcat/shared/lib/ and tomcat/lib/, but without success.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The My Files link is also still there.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using a fresh install of 4.2.e on Centos 6 x64 with only some small modifcations to some dashlets, but none related to the header. I use a non-admin test user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to check if the jar is active and the files in it are loaded succesfully?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Oct 2013 18:43:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284026#M237156</guid>
      <dc:creator>ebogaard</dc:creator>
      <dc:date>2013-10-24T18:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284027#M237157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can I just check that you're definitely deploying the module via the module deployment page (e.g.at share/page/modules/deploy) ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 08:27:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284027#M237157</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-10-25T08:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284028#M237158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dave,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your suggestion: deploying it via the module deployment page was the solution. I probably didn'd re-read part 1 of you blog, where you mention this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And I'm not yet very used to deploying new code via that mechanism, as for a long time it has been "placing files + restart = profit".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The good news is that I also found the previous additions I made (based on your code) to hide 'Create Site'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 09:15:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284028#M237158</guid>
      <dc:creator>ebogaard</dc:creator>
      <dc:date>2013-10-25T09:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Make options in header 'admin-only' in Alfresco 4.2d</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284029#M237159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It is possible to have modules auto-deploy (see this post:&lt;/SPAN&gt;&lt;A href="http://blogs.alfresco.com/wp/developer/2012/01/04/extensibilty-updates-roundup/" rel="nofollow noopener noreferrer"&gt;http://blogs.alfresco.com/wp/developer/2012/01/04/extensibilty-updates-roundup/&lt;/A&gt;&lt;SPAN&gt;) but the default it for module deployment to be manual. Glad you've resolved your problems though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dave&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 10:10:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/make-options-in-header-admin-only-in-alfresco-4-2d/m-p/284029#M237159</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2013-10-25T10:10:43Z</dc:date>
    </item>
  </channel>
</rss>

