cancel
Showing results for 
Search instead for 
Did you mean: 

disable create site button

marcio
Champ in-the-making
Champ in-the-making
Hello guys.

Im used this tutorial (http://docs.alfresco.com/community/tasks/site-creation-permission.html) to disable the 'create site' option, but I got this error and Alfresco not loads.  I copy/paste the content and change only the "org.alfresco.service.cmr.site.SiteService.createSite=ACL_METHOD.ROLE_ADMINISTRAT"


59603 2015-03-26 17:11:16,594  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed

59604  org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:alfresco/application-context.xml]

59605 Offending resource: ServletContext resource [/WEB-INF/web-application-context.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:alfresco/extension/*-context.xml]

59606 Offending resource: class path resource [alfresco/application-context.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 39 in XML document from file [/opt/alfresco-5.0.c/tomcat/shared/classes/alfresco/extension/custom-public-services-security-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 39; columnNumber: 9; An element with the identifier "afterInvocationManager" must appear in the document.

I appreciate any helps.
Thank you.
2 REPLIES 2

g_rathod
Star Contributor
Star Contributor
Hi Marcio,

To disable create site link you can do in following way :
#1) <ALF_HOME>\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets\my-sites.get.js
    you can make changes to the below line from true to false
   
model.showCreateSite = false;


#2) <ALF_HOME>\tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\components\dashlets\my-sites.get.html.ftl
    You can remove block
   

<#if showCreateSite>
                  <span class="first-child">
                     <a href="#" id="${id}-createSite-button" class="theme-color-1">
                        <img src="${url.context}/res/components/images/site-16.png" style="vertical-align: text-bottom" />
                        ${msg("link.createSite")}</a>
                  </span>
                  </#if>


Hope this helps you !!

marcio
Champ in-the-making
Champ in-the-making
I use this steps and works fine.

https://github.com/jpotts/share-site-creators/tree/5.0.d

Thank you.