diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 5442151b11..4ebe7922dd 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1924,7 +1924,6 @@ error_rule=Failed to create Rule due to error: {0} error_space=Failed to create new space due to error: {0} error_person=Failed to create Person due to error: {0} error_delete_user=Failed to delete User due to error: {0} -error_delete_user_object=Unable to delete the User object associated with the Person. This is not an error if an external authentication mechanism such as NTLM was previously active. error_remove_user=Failed to remove User due to error: {0} error_password_match=Please ensure that both password fields contain the same value. error_property=Property ''{0}'' is not available for this node diff --git a/source/java/org/alfresco/web/bean/users/DeleteUserDialog.java b/source/java/org/alfresco/web/bean/users/DeleteUserDialog.java index 6a6358019f..a6af09b528 100644 --- a/source/java/org/alfresco/web/bean/users/DeleteUserDialog.java +++ b/source/java/org/alfresco/web/bean/users/DeleteUserDialog.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2007 Alfresco Software Limited. + * Copyright (C) 2005-2009 Alfresco Software Limited. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -18,7 +18,7 @@ * As a special exception to the terms and conditions of version 2.0 of * the GPL, you may redistribute this Program in connection with Free/Libre * and Open Source Software ("FLOSS") applications as described in Alfresco's - * FLOSS exception. You should have recieved a copy of the text describing + * FLOSS exception. You should have received a copy of the text describing * the FLOSS exception, and it is also available here: * http://www.alfresco.com/legal/licensing" */ @@ -34,7 +34,6 @@ import javax.faces.context.FacesContext; import javax.faces.event.ActionEvent; import javax.transaction.UserTransaction; -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.search.ResultSet; @@ -44,7 +43,6 @@ import org.alfresco.service.cmr.security.AuthenticationService; import org.alfresco.service.cmr.security.PersonService; import org.alfresco.util.ISO9075; import org.alfresco.web.app.Application; -import org.alfresco.web.bean.LoginBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; @@ -64,8 +62,6 @@ public class DeleteUserDialog extends BaseDialogBean private static final String ERROR_DELETE = "error_delete_user"; - private static final String ERROR_USER_DELETE = "error_delete_user_object"; - private static final String BUTTON_YES = "yes"; private static final String MSG_TITLE_DELETE_USER = "title_delete_user"; @@ -95,22 +91,6 @@ public class DeleteUserDialog extends BaseDialogBean { String userName = (String) getPerson().getProperties().get("userName"); - // we only delete the user auth if Alfresco is managing the authentication - Map session = context.getExternalContext().getSessionMap(); - if (session.get(LoginBean.LOGIN_EXTERNAL_AUTH) == null) - { - // delete the User authentication - try - { - getAuthenticationService().deleteAuthentication(userName); - } - catch (AuthenticationException authErr) - { - Utils.addErrorMessage(Application.getMessage(context, ERROR_USER_DELETE)); - ReportedException.throwIfNecessary(authErr); - } - } - // delete the associated Person getPersonService().deletePerson(userName); diff --git a/source/java/org/alfresco/web/bean/users/UsersDialog.java b/source/java/org/alfresco/web/bean/users/UsersDialog.java index e374b16e09..2fd113d145 100644 --- a/source/java/org/alfresco/web/bean/users/UsersDialog.java +++ b/source/java/org/alfresco/web/bean/users/UsersDialog.java @@ -38,7 +38,6 @@ import javax.transaction.UserTransaction; import org.alfresco.model.ContentModel; import org.alfresco.repo.search.impl.lucene.LuceneQueryParser; -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.search.ResultSet; @@ -49,7 +48,6 @@ import org.alfresco.service.namespace.QName; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.IContextListener; import org.alfresco.web.app.context.UIContextService; -import org.alfresco.web.bean.LoginBean; import org.alfresco.web.bean.dialog.BaseDialogBean; import org.alfresco.web.bean.dialog.ChangeViewSupport; import org.alfresco.web.bean.repository.MapNode; @@ -78,9 +76,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener, Cha public static final String ERROR_PASSWORD_MATCH = "error_password_match"; public static final String ERROR_NEGATIVE_QUOTA = "error_negative_quota"; 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 = "dialog:manageUsers"; private static final String DIALOG_CLOSE = "dialog:close"; private static final String VIEW_DETAILS = "user_details"; @@ -226,22 +222,7 @@ public class UsersDialog extends BaseDialogBean implements IContextListener, Cha try { String userName = (String) properties.getPerson().getProperties().get("userName"); - - // we only delete the user auth if Alfresco is managing the authentication - Map session = context.getExternalContext().getSessionMap(); - if (session.get(LoginBean.LOGIN_EXTERNAL_AUTH) == null) - { - // delete the User authentication - try - { - properties.getAuthenticationService().deleteAuthentication(userName); - } - catch (AuthenticationException authErr) - { - // Let's not worry if authentication details don't exist - } - } - + // delete the associated Person properties.getPersonService().deletePerson(userName);