Author: channa
Date: Wed Jul  9 04:31:22 2008
New Revision: 19030
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19030

Log:
Deferring 'remember me' check for after initial setup. Updated user name list 
to search on given name as well as user name (required for MASHUP-910). Using 
'Add' log entries (partial for MASHUP-657).


Modified:
   
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
   
trunk/mashup/java/modules/coreservices/servicemetadatalister/src/org/wso2/mashup/coreservices/servicemetadatalister/ServiceMetaDataListerService.java
   trunk/mashup/java/modules/www/validate_login.jsp

Modified: 
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java?rev=19030&r1=19029&r2=19030&view=diff
==============================================================================
--- 
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
  (original)
+++ 
trunk/mashup/java/modules/core/src/org/wso2/mashup/webapp/utils/RegistryUtils.java
  Wed Jul  9 04:31:22 2008
@@ -427,7 +427,16 @@
                         queryResult.setDate(logEntry.getDate());
 
                         int action = logEntry.getAction();
-                        if (action == LogEntry.UPDATE) {
+
+                        // todo: Using number instead of constant until 
patches sorted out.
+                        if (action == 0) {
+                            String[] pathSegments = 
logEntry.getResourcePath().split("/");
+                            if ((logEntry.getResourcePath().startsWith(
+                                    MashupConstants.ALL_MASHUPS_PATH)) &&
+                                    (pathSegments.length > 3)) {
+                                queryResult.setAction("added");
+                            } else continue;
+                        } else if (action == LogEntry.UPDATE) {
                             String[] pathSegments = 
logEntry.getResourcePath().split("/");
                             if ((logEntry.getResourcePath().startsWith(
                                     MashupConstants.ALL_MASHUPS_PATH)) &&

Modified: 
trunk/mashup/java/modules/coreservices/servicemetadatalister/src/org/wso2/mashup/coreservices/servicemetadatalister/ServiceMetaDataListerService.java
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/coreservices/servicemetadatalister/src/org/wso2/mashup/coreservices/servicemetadatalister/ServiceMetaDataListerService.java?rev=19030&r1=19029&r2=19030&view=diff
==============================================================================
--- 
trunk/mashup/java/modules/coreservices/servicemetadatalister/src/org/wso2/mashup/coreservices/servicemetadatalister/ServiceMetaDataListerService.java
       (original)
+++ 
trunk/mashup/java/modules/coreservices/servicemetadatalister/src/org/wso2/mashup/coreservices/servicemetadatalister/ServiceMetaDataListerService.java
       Wed Jul  9 04:31:22 2008
@@ -170,10 +170,12 @@
             UserStoreReader storeReader = realm.getUserStoreReader();
             String[] userNames = storeReader.getAllUserNames();
             for (int i = 0; i < userNames.length; i++) {
-                if (namePrefix.equals(MashupConstants.WILDCARD_VALUE) || 
userNames[i].regionMatches(true, 0, namePrefix,
-                        0, namePrefix.length())) {
-                    String fullName = (String) 
storeReader.getUserProperties(userNames[i])
-                        .get(MashupConstants.FULL_NAME);
+                String fullName = (String) 
storeReader.getUserProperties(userNames[i]).get(
+                        MashupConstants.FULL_NAME);
+                // Include the name in the filtered list if either user or 
full name is a match.
+                if (namePrefix.equals(MashupConstants.WILDCARD_VALUE) || 
userNames[i].regionMatches(
+                        true, 0, namePrefix, 0, namePrefix.length()) || 
fullName.regionMatches(
+                        true, 0, namePrefix, 0, namePrefix.length())) {
                     filteredNames.add(new UserInformation(userNames[i], 
fullName));
                 }
             }

Modified: trunk/mashup/java/modules/www/validate_login.jsp
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/validate_login.jsp?rev=19030&r1=19029&r2=19030&view=diff
==============================================================================
--- trunk/mashup/java/modules/www/validate_login.jsp    (original)
+++ trunk/mashup/java/modules/www/validate_login.jsp    Wed Jul  9 04:31:22 2008
@@ -39,7 +39,7 @@
     UserRegistry userRegistry = RegistryUtils.getRegistry(request);
 
     //Checking whether the user is logged in
-    if (!RegistryUtils.isLoggedIn(userRegistry)) {
+    if (!RegistryUtils.isLoggedIn(userRegistry) && 
MashupUtils.isInitialSetupComplete()) {
 
         //Check whether the remember me option is set
         Cookie[] cookies = request.getCookies();

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

Reply via email to