AnsweredAssumed Answered

Alfresco 4.2 Enterprise: Hide Create Folder from non-admin users

Question asked by mduduzi on Jan 30, 2014
Latest reply on Oct 1, 2015 by cristina.lancioni
Hi,

We have a requirement to hide Create Folder from non-admin users and when we edit the file toolbar.lib.ftl as follows I get the Upload button is disabled as well:

       <#if user.isAdmin>
         <div class="hideable toolbar-hidden DocListTree">
            <div class="new-folder">
               <span id="${id}-newFolder-button" class="yui-button yui-push-button">
                  <span class="first-child">
                     <button name="newFolder">${msg("button.new-folder")}</button>
                  </span>
               </span>
            </div>
         </div>
       </#if>
      
       <#if !user.isAdmin>
         <div class="hideable toolbar-hidden DocListTree" style="display: none;">
            <div class="new-folder">
               <span id="${id}-newFolder-button" class="yui-button yui-push-button">
                  <span class="first-child">
                     <button name="newFolder">${msg("button.new-folder")}</button>
                  </span>
               </span>
            </div>
         </div>
       </#if>
      
        
         <div class="hideable toolbar-hidden DocListTree">
            <div class="file-upload">
               <span id="${id}-fileUpload-button" class="yui-button yui-push-button">
                  <span class="first-child">
                     <button name="fileUpload">${msg("button.upload")}</button>
                  </span>
               </span>
            </div>
         </div>


I am not sure why because this are two seperate button. If the is another way of hiding the create folder button from non-admin user please advise.

Kind regards

Outcomes