. Fix to message properties file duplicates (as per forum post: http://www.alfresco.org/forums/viewtopic.php?p=3452#3452)

. And fix to spelling errors etc. as also noted in the post
. Fix to AWC-468, so the Person for an User can be deleted even if the User doesn't exist due to previous Auth mechanism such as NTLM

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2291 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-02-03 11:26:29 +00:00
parent 2c8233db84
commit 774cf9eb4d
5 changed files with 19 additions and 24 deletions

View File

@@ -27,6 +27,7 @@ import javax.faces.event.ActionEvent;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationException;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -54,6 +55,7 @@ public class UsersBean implements IContextListener
public static final String ERROR_PASSWORD_MATCH = "error_password_match";
private static final String ERROR_DELETE = "error_delete_user";
private static final String ERROR_USER_DELETE = "error_delete_user_object";
private static final String DEFAULT_OUTCOME = "manageUsers";
@@ -78,6 +80,7 @@ public class UsersBean implements IContextListener
private String confirm = null;
private String searchCriteria = null;
// ------------------------------------------------------------------------------
// Construction
@@ -264,7 +267,14 @@ public class UsersBean implements IContextListener
if (session.get(LoginBean.LOGIN_EXTERNAL_AUTH) == null)
{
// delete the User authentication
authenticationService.deleteAuthentication((String) getPerson().getProperties().get("userName"));
try
{
authenticationService.deleteAuthentication((String) getPerson().getProperties().get("userName"));
}
catch (AuthenticationException authErr)
{
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), ERROR_USER_DELETE));
}
}
// delete the associated Person