change Password returns different messages for different problems
authorKatja Luther <k.luther@bgbm.org>
Tue, 17 Feb 2015 09:09:23 +0000 (09:09 +0000)
committerKatja Luther <k.luther@bgbm.org>
Tue, 17 Feb 2015 09:09:23 +0000 (09:09 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/password/PasswordWizard.java

index 242e595b32c9a789743e5144987fcaa3b13a692b..3dbe100ef6134198a5933bbfcbff633414377f34 100644 (file)
@@ -13,6 +13,7 @@ package eu.etaxonomy.taxeditor.ui.password;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Display;
 import org.springframework.security.access.AccessDeniedException;
+import org.springframework.security.core.AuthenticationException;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
@@ -78,7 +79,10 @@ public class PasswordWizard extends Wizard implements IConversationEnabled{
                        return true;
                }catch(AccessDeniedException e){
                        MessagingUtils.warningDialog("Could not change password", this, "The old password is not correct.");
-                       
+                       return false;
+               }catch (AuthenticationException e){
+                       MessagingUtils.warningDialog("Could not change password", this, "The old password is not correct.");
+               
                        return false;
                }catch(Exception e){
                        MessagingUtils.warningDialog("Problem with changing password", this, "The password could not be changed. " + e.getMessage());