AnsweredAssumed Answered

SiteService_security bean override causes SEVERE error

Question asked by gerryr on Jan 12, 2014
Latest reply on Apr 5, 2017 by idwright
I'm trying to restrict ability to create/delete Sites to just admins.

So I copy the SiteService_security bean from  tomcat/webapps/alfresco/WEB-INF/classes/alfresco/public-services-security-context.xml and put it into a custom file:  tomcat/shared/classes/alfresco/web-extension/custom-public-services-security-context.xml.

Then I change these two lines:
org.alfresco.service.cmr.site.SiteService.createSite=ACL_ALLOW
org.alfresco.service.cmr.site.SiteService.deleteSite=ACL_ALLOW
to:
org.alfresco.service.cmr.site.SiteService.createSite=ACL_METHOD.ROLE_ADMINISTRATOR
org.alfresco.service.cmr.site.SiteService.deleteSite=ACL_METHOD.ROLE_ADMINISTRATOR

and restart Tomcat

This results is a listener error in the catalina.log file:
        INFO: Deploying web application archive C:\Alfresco\tomcat\webapps\share.war
        Jan 11, 2014 6:33:05 PM org.apache.catalina.core.StandardContext startInternal
==>    SEVERE: Error listenerStart
        Jan 11, 2014 6:33:05 PM org.apache.catalina.core.StandardContext startInternal
        SEVERE: Context [/share] startup failed due to previous errors

So I run netstat and see this:
$ netstat -a | grep 8080
  TCP    127.0.0.1:8080         XX-XXXXXXXX-XXX:57564  TIME_WAIT
  TCP    127.0.0.1:8080         XX-XXXXXXXX-XXX:57566  TIME_WAIT

There are two processes listening on 8080 and of course nothing works.  You get the Tomcat error page everywhere.

I reran this several times making sure that netstat showed nothing on 8080 before restarting Tomcat and got same results.

Shouldn't the bean declaration in the custom file supercede the same bean in the war?

Outcomes