mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -1796,7 +1796,7 @@ public class PersonServiceImpl extends TransactionListenerAdapter implements Per
|
|||||||
public void beforeDeleteNode(NodeRef nodeRef)
|
public void beforeDeleteNode(NodeRef nodeRef)
|
||||||
{
|
{
|
||||||
String userName = (String) this.nodeService.getProperty(nodeRef, ContentModel.PROP_USERNAME);
|
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.");
|
throw new AlfrescoRuntimeException("The " + userName + " user cannot be deleted.");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user