mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
Merged V3.2 to HEAD
15828: ETHREEOH-2601: Users dialog won't delete users who have no authentication information - Moved the AuthenticationService.deleteAuthentication() call inside PersonService.deletePerson() and protected with try - catch so that if there is no authentication information (for an upgraded/moved user) the person can still be deleted - Removed a bunch of redundant deleteAuthentication() calls git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15829 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -345,18 +345,6 @@ public class InviteServiceTest extends BaseWebScriptTest
|
|||||||
|
|
||||||
private void deletePersonByUserName(String userName)
|
private void deletePersonByUserName(String userName)
|
||||||
{
|
{
|
||||||
// delete authentication if authentication exists for given user name
|
|
||||||
if (this.authenticationService.authenticationExists(userName))
|
|
||||||
{
|
|
||||||
this.authenticationService.deleteAuthentication(userName);
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete user account
|
|
||||||
if (this.mutableAuthenticationDao.userExists(userName))
|
|
||||||
{
|
|
||||||
this.mutableAuthenticationDao.deleteUser(userName);
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete person node associated with given user name
|
// delete person node associated with given user name
|
||||||
// if one exists
|
// if one exists
|
||||||
if (this.personService.personExists(userName))
|
if (this.personService.personExists(userName))
|
||||||
|
@@ -152,22 +152,6 @@ public class RuleServiceTest extends BaseWebScriptTest
|
|||||||
// ;
|
// ;
|
||||||
// AuthenticationUtil.runAs(runAsWork, AuthenticationUtil.getSystemUserName());
|
// AuthenticationUtil.runAs(runAsWork, AuthenticationUtil.getSystemUserName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void deleteUserAndAssocPerson(String userName)
|
|
||||||
{
|
|
||||||
// delete authentication if authentication exists for given user name
|
|
||||||
if (this.authenticationService.authenticationExists(userName))
|
|
||||||
{
|
|
||||||
this.authenticationService.deleteAuthentication(userName);
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete person node associated with given user name
|
|
||||||
// if one exists
|
|
||||||
if (this.personService.personExists(userName))
|
|
||||||
{
|
|
||||||
this.personService.deletePerson(userName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a URL to the Rule Collection associated with the given rule owning
|
* Get a URL to the Rule Collection associated with the given rule owning
|
||||||
|
@@ -600,10 +600,6 @@ public class AdministrationWebService extends AbstractWebService implements
|
|||||||
{
|
{
|
||||||
for (String userName : userNames)
|
for (String userName : userNames)
|
||||||
{
|
{
|
||||||
if (this.manageAuthenticationDetails == true)
|
|
||||||
{
|
|
||||||
this.authenticationService.deleteAuthentication(userName);
|
|
||||||
}
|
|
||||||
this.personService.deletePerson(userName);
|
this.personService.deletePerson(userName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user