Author: channa
Date: Thu Aug  7 12:58:17 2008
New Revision: 20556
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=20556

Log:
Propogating password change failure up as permitted by the API. MASHUP-1013.


Modified:
   
trunk/mashup/java/modules/core/src/org/wso2/mashup/realm/wsas/WSASUserStoreAdmin.java

Modified: 
trunk/mashup/java/modules/core/src/org/wso2/mashup/realm/wsas/WSASUserStoreAdmin.java
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/core/src/org/wso2/mashup/realm/wsas/WSASUserStoreAdmin.java?rev=20556&r1=20555&r2=20556&view=diff
==============================================================================
--- 
trunk/mashup/java/modules/core/src/org/wso2/mashup/realm/wsas/WSASUserStoreAdmin.java
       (original)
+++ 
trunk/mashup/java/modules/core/src/org/wso2/mashup/realm/wsas/WSASUserStoreAdmin.java
       Thu Aug  7 12:58:17 2008
@@ -212,13 +212,19 @@
 
     public void updateUser(String userName, Object newCredential, Object 
oldCredential)
             throws UserStoreException {
+        boolean success;
         try {
             UserAdmin admin = new UserAdmin();
-            admin.editUserPassword((String) oldCredential, userName, (String) 
newCredential);
+            success = admin.editUserPassword((String) oldCredential, userName, 
(String)
+                    newCredential);
+
+            // Since API is fixed, we have to throw an exception if edit 
operation returns false.
+            if (!success) {
+                throw new UserStoreException("Password Change Failed");
+            }
         } catch (Exception e) {
             throw new UserStoreException(e.getMessage());
         }
-
     }
 
     public void removeUserFromRole(String userName, String roleName) throws 
UserStoreException {

_______________________________________________
Mashup-dev mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to