ACE-3222 - Unable to delete an empty tenant

- Fix to allow PersonService to delete the Guest user for a tenant

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@88755 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2014-10-20 14:42:55 +00:00
parent 961b449411
commit 60f6927bf6

View File

@@ -1796,7 +1796,7 @@ public class PersonServiceImpl extends TransactionListenerAdapter implements Per
public void beforeDeleteNode(NodeRef nodeRef)
{
String userName = (String) this.nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);
if (this.authorityService.isGuestAuthority(userName))
if (this.authorityService.isGuestAuthority(userName) && !this.tenantService.isTenantUser(userName))
{
throw new AlfrescoRuntimeException("The " + userName + " user cannot be deleted.");
}