Author: keith
Date: Sat Jan 26 22:46:12 2008
New Revision: 12978

Log:

Moving the logic of removing the wsas inserted admin before we start the 
cretion of user accounts so that an admin account is created always.



Modified:
   
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java

Modified: 
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
==============================================================================
--- 
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
   (original)
+++ 
trunk/mashup/java/modules/core/src/org/wso2/mashup/transport/MashupServerInitializer.java
   Sat Jan 26 22:46:12 2008
@@ -66,6 +66,13 @@
 
         try {
 
+            // Delete wsas-created 'admin' user, unless created within mashup 
server.
+            UserStoreAdmin userStoreAdmin = realm.getUserStoreAdmin();
+            if (userStoreAdmin.isExistingUser(RegistryConstants.ADMIN_USER) &&
+                    !RegistryUtils.isMashupUser(realm, 
RegistryConstants.ADMIN_USER)) {
+                userStoreAdmin.deleteUser(RegistryConstants.ADMIN_USER);
+            }
+
             String[] userNames = realm.getUserStoreAdmin().getAllUserNames();
             for (int i = 0; i < userNames.length; i++) {
                 String username = userNames[i];
@@ -108,13 +115,6 @@
                                                   new String[] {
                                                           
MashupConstants.MASHUP_USER_ROLE });
 
-            // Delete wsas-created 'admin' user, unless created within mashup 
server.
-            UserStoreAdmin userStoreAdmin = realm.getUserStoreAdmin();
-            if (userStoreAdmin.isExistingUser(RegistryConstants.ADMIN_USER) &&
-                    !RegistryUtils.isMashupUser(realm, 
RegistryConstants.ADMIN_USER)) {
-                userStoreAdmin.deleteUser(RegistryConstants.ADMIN_USER);
-            }
-
             // Applying a dummy tag so that searching works
             // https://wso2.org/jira/browse/REGISTRY-24
             SecureRegistry secureRegistry =

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

Reply via email to