Attempt to work around some of the issues associated with ALF-19155 (MT deleteTenant does not work)

- Currently MT's deleteTenant should be regarded as incomplete and avoided


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@52032 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2013-07-03 02:45:17 +00:00
parent 8feb6edd43
commit 1a6fde33ca
2 changed files with 16 additions and 8 deletions

View File

@@ -43,6 +43,8 @@ import org.alfresco.repo.model.Repository;
import org.alfresco.repo.node.archive.NodeArchiveService;
import org.alfresco.repo.node.archive.RestoreNodeReport;
import org.alfresco.repo.node.index.FullIndexRecoveryComponent;
import org.alfresco.repo.node.index.IndexTransactionTracker;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.security.permissions.impl.AccessPermissionImpl;
@@ -252,6 +254,12 @@ public class MultiTDemoTest extends TestCase
{
if (tenantAdminService.existsTenant(tenantDomain))
{
// TODO: WARNING: HACK for ALF-19155: MT deleteTenant does not work
// PersonService prevents 'guest' authorities from being deleted
{
BehaviourFilter behaviourFilter = (BehaviourFilter) ctx.getBean("policyBehaviourFilter");
behaviourFilter.disableBehaviour(ContentModel.TYPE_PERSON);
}
tenantAdminService.deleteTenant(tenantDomain);
logger.info("Deleted tenant " + tenantDomain);