Fix to run SiteAVMBoostrap as system user since AVM permissions.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@9670 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-07-07 17:52:57 +00:00
parent a1da364950
commit cdd69a3879

View File

@@ -25,6 +25,8 @@
package org.alfresco.repo.site;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.repository.StoreRef;
@@ -91,7 +93,15 @@ public class SiteAVMBootstrap extends AbstractLifecycleBean
@Override
protected void onBootstrap(ApplicationEvent event)
{
bootstrap();
// run as System on bootstrap
AuthenticationUtil.runAs(new RunAsWork<Object>()
{
public Object doWork()
{
bootstrap();
return null;
}
}, AuthenticationUtil.getSystemUserName());
}
/**