Author: taylor
Date: Fri Dec 30 21:19:04 2005
New Revision: 360245

URL: http://svn.apache.org/viewcvs?rev=360245&view=rev
Log:
fix from David Jencks during his vacation 
subject check was being skipped under certain conditions

Modified:
    
portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/security/PortletPermission.java

Modified: 
portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/security/PortletPermission.java
URL: 
http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/security/PortletPermission.java?rev=360245&r1=360244&r2=360245&view=diff
==============================================================================
--- 
portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/security/PortletPermission.java
 (original)
+++ 
portals/jetspeed-2/trunk/commons/src/java/org/apache/jetspeed/security/PortletPermission.java
 Fri Dec 30 21:19:04 2005
@@ -66,17 +66,19 @@
         String name = getName(); 
         if (name != null)            
         {
-            int index = name.indexOf('*'); 
+            int index = name.indexOf('*');            
             if (index > -1)
             {
-                boolean test = 
permission.getName().startsWith(name.substring(0, index));
-                return test;
-            }
-            // The portlet name must be the same.
-            if (!(permission.getName().equals(name)))
+                if (!(permission.getName().startsWith(name.substring (0, 
index)))) 
+                {
+                    return false;
+                }
+            } 
+            else if (!(permission.getName().equals(name)))
             {
+                // The portlet name must be the same.
                 return false;
-            }
+            }            
         }
         
         PortletPermission portletPerm = (PortletPermission) permission;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to