cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r795048 - in /cxf/branches/2.2.x-fixes: ./ common/common/src/main/java/org/apache/cxf/common/util/ systests/src/test/java/org/apache/cxf/systest/jaxrs/security/ systests/src/test/resources/jaxrs_security/WEB-INF/ systests/src/test/resources...
Date Fri, 17 Jul 2009 11:30:39 GMT
Author: sergeyb
Date: Fri Jul 17 11:30:39 2009
New Revision: 795048

URL: http://svn.apache.org/viewvc?rev=795048&view=rev
Log:
Merged revisions 795044 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r795044 | sergeyb | 2009-07-17 12:22:28 +0100 (Fri, 17 Jul 2009) | 1 line
  
  [CXF-2345] Fixing SpringAopClassHelper to recognize double CGLIB proxies
........

Added:
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBook.java
      - copied unchanged from r795044, cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBook.java
Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/SpringAopClassHelper.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java
    cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
    cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml
    cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 17 11:30:39 2009
@@ -1 +1 @@
-/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780
+/cxf/trunk:782728-782730,783097,783294,783396,784059,784181-784184,784893,784895,785279-785282,785468,785621,785624,785651,785734,785866,786142,786271-786272,786395,786512,786514,786582-786583,786638,786647,786850,787200,787269,787277-787279,787290-787291,787305,787323,787366,787849,788030,788060,788187,788444,788451,788703,788752,788774,788819-788820,789013,789371,789387,789420,789527-789530,789704-789705,789788,789811,789896-789901,790074,790094,790134,790188,790294,790553,790637-790644,790868,791301,791354,791538,791753,791947,792007,792096,792183,792261-792265,792271,792604,792683-792685,792975,792985,793059,793570,794297,794396,794680,794728,794771,794778-794780,795044

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/SpringAopClassHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/SpringAopClassHelper.java?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/SpringAopClassHelper.java
(original)
+++ cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/SpringAopClassHelper.java
Fri Jul 17 11:30:39 2009
@@ -46,7 +46,9 @@
                 // ignore
             }
             
-        } 
+        } else if (AopUtils.isCglibProxyClass(o.getClass())) {
+            return AopUtils.getTargetClass(o);
+        }
         return o.getClass();
     }
     

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityClassTest.java
Fri Jul 17 11:30:39 2009
@@ -62,5 +62,13 @@
         getBook(endpointAddress, "bob", "bobspassword", 403);
     }
     
+    @Test
+    public void testGetBookSubresourceAdmin() throws Exception {
+        String endpointAddress =
+            "http://localhost:9080/bookstorestorage/securebook/self"; 
+        getBook(endpointAddress, "foo", "bar", 200); 
+        getBook(endpointAddress, "bob", "bobspassword", 403);
+    }
+    
       
 }

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRSSpringSecurityInterfaceTest.java
Fri Jul 17 11:30:39 2009
@@ -120,4 +120,12 @@
         assertEquals(expectedStatus, r.getStatus());
             
     }
+    
+    @Test
+    public void testGetBookSubresourceAdmin() throws Exception {
+        String endpointAddress =
+            "http://localhost:9080/bookstorestorage/securebook/self"; 
+        getBook(endpointAddress, "foo", "bar", 200); 
+        getBook(endpointAddress, "bob", "bobspassword", 403);
+    }
 }

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookInterface.java
Fri Jul 17 11:30:39 2009
@@ -56,4 +56,7 @@
     @Produces("application/xml")
     @Secured("ROLE_ADMIN")
     Book getDefaultBook() throws BookNotFoundFault;
+    
+    @Path("/securebook")
+    SecureBook getSecureBook() throws BookNotFoundFault;
 }

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStore.java
Fri Jul 17 11:30:39 2009
@@ -80,4 +80,9 @@
     public Book getDefaultBook() throws BookNotFoundFault {
         return books.get(123L);
     }
+    
+    @Path("/securebook")
+    public SecureBook getSecureBook() throws BookNotFoundFault {
+        return new SecureBook("CXF in Action", 123L);
+    }
 }

Modified: cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
Fri Jul 17 11:30:39 2009
@@ -68,4 +68,9 @@
     public Book getThatBook() throws BookNotFoundFault {
         return books.get(123L);
     }
+    
+    @Path("/securebook")
+    public SecureBook getSecureBook() throws BookNotFoundFault {
+        return new SecureBook("CXF in Action", 123L);
+    }
 }

Modified: cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security/WEB-INF/beans.xml
Fri Jul 17 11:30:39 2009
@@ -59,8 +59,11 @@
 
   <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStore">
      <property name="bookStore" ref="bookstore2"/>
+     <lookup-method name="getSecureBook" bean="subResource" />
   </bean>
   
+  <bean id="subResource" class="org.apache.cxf.systest.jaxrs.security.SecureBook"/>
 
+  
   <bean id="bookstore2" class="org.apache.cxf.systest.jaxrs.security.SecureBookStore"/>
 
   <security:global-method-security secured-annotations="enabled"/>

Modified: cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml?rev=795048&r1=795047&r2=795048&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
(original)
+++ cxf/branches/2.2.x-fixes/systests/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
Fri Jul 17 11:30:39 2009
@@ -53,7 +53,12 @@
     </jaxrs:providers>
   </jaxrs:server>
 
-  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStoreNoInterface"/>
+  <bean id="bookstore" class="org.apache.cxf.systest.jaxrs.security.SecureBookStoreNoInterface">
+      <lookup-method name="getSecureBook" bean="subResource" />
+  </bean>
+  
+  <bean id="subResource" class="org.apache.cxf.systest.jaxrs.security.SecureBook"/>
+  
   <aop:config proxy-target-class="true"/>
   
   <security:global-method-security secured-annotations="enabled"/>



Mime
View raw message