mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-3216 - added unit test
This commit is contained in:
@@ -28,7 +28,7 @@ package org.alfresco.repo.imap;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.policy.BehaviourFilter;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.module.org_alfresco_module_rm.util.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
import org.alfresco.repo.site.SiteModel;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -46,7 +46,8 @@ public class ExtendedImapServiceImpl extends ImapServiceImpl
|
||||
{
|
||||
private NodeService nodeService;
|
||||
private BehaviourFilter policyBehaviourFilter;
|
||||
private DictionaryService dictionaryService;
|
||||
private DictionaryService dictionaryService;
|
||||
private AuthenticationUtil authenticationUtil;
|
||||
|
||||
public void setDictionaryService(DictionaryService dictionaryService)
|
||||
{
|
||||
@@ -64,12 +65,12 @@ public class ExtendedImapServiceImpl extends ImapServiceImpl
|
||||
this.nodeService = nodeService;
|
||||
super.setNodeService(nodeService);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
/**
|
||||
* Overwrites the core functionality so we can list RM files in IMAP
|
||||
* @see https://issues.alfresco.com/jira/browse/RM-3216
|
||||
*/
|
||||
*/
|
||||
@Override
|
||||
public String getPathFromSites(final NodeRef ref)
|
||||
{
|
||||
return doAsSystem(new RunAsWork<String>()
|
||||
@@ -97,7 +98,7 @@ public class ExtendedImapServiceImpl extends ImapServiceImpl
|
||||
policyBehaviourFilter.disableBehaviour(ContentModel.ASPECT_VERSIONABLE);
|
||||
try
|
||||
{
|
||||
return AuthenticationUtil.runAs(work, AuthenticationUtil.getSystemUserName());
|
||||
return authenticationUtil.runAsSystem(work);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Reference in New Issue
Block a user