Fix failing unit test.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@66101 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2014-04-01 23:47:31 +00:00
parent dfe68049e3
commit c7facab5a9

View File

@@ -268,10 +268,21 @@ public class RmSiteType extends BaseBehaviourBean
{ {
throw new AlfrescoRuntimeException("The records management site can not be deleted, because the user doesn't have sufficient privillages to delete the file plan."); throw new AlfrescoRuntimeException("The records management site can not be deleted, because the user doesn't have sufficient privillages to delete the file plan.");
} }
// delete the authority // work around for MNT-11038 .. we want to ensure that the RM site can be created once it's been deleted since we only
String siteGroup = siteService.getSiteGroup(siteInfo.getShortName()); // allow one short name for the RM site
authorityService.deleteAuthority(siteGroup, true); AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
{
@Override
public Void doWork() throws Exception
{
// delete the authority
String siteGroup = siteService.getSiteGroup(siteInfo.getShortName());
authorityService.deleteAuthority(siteGroup, true);
return null;
}
});
} }
} }
} }