cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r911402 - in /cxf/branches/2.2.x-fixes: ./ systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/ systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/
Date Thu, 18 Feb 2010 13:50:54 GMT
Author: sergeyb
Date: Thu Feb 18 13:50:53 2010
New Revision: 911402

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

........
  r911366 | sergeyb | 2010-02-18 12:26:21 +0000 (Thu, 18 Feb 2010) | 1 line
  
  JAXRS : updating one of the security tests to use @RolesAllowed
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBook.java
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
    svn:mergeinfo = /cxf/trunk:911366

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

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBook.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBook.java?rev=911402&r1=911401&r2=911402&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBook.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBook.java
Thu Feb 18 13:50:53 2010
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.systest.jaxrs.security;
 
+import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
@@ -59,6 +60,7 @@
     @Path("self")    
     @Produces("application/xml")
     @Secured("ROLE_ADMIN")
+    @RolesAllowed("ROLE_ADMIN")
     public Book getBook() {
         return new Book(name, id);
     } 

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java?rev=911402&r1=911401&r2=911402&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/SecureBookStoreNoInterface.java
Thu Feb 18 13:50:53 2010
@@ -22,6 +22,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.annotation.security.RolesAllowed;
 import javax.ws.rs.FormParam;
 import javax.ws.rs.GET;
 import javax.ws.rs.POST;
@@ -31,7 +32,6 @@
 
 import org.apache.cxf.systest.jaxrs.Book;
 import org.apache.cxf.systest.jaxrs.BookNotFoundFault;
-import org.springframework.security.annotation.Secured;
 
 @Path("/bookstorestorage/")
 public class SecureBookStoreNoInterface {
@@ -46,7 +46,7 @@
     
     @POST
     @Path("/bookforms")
-    @Secured({"ROLE_USER", "ROLE_ADMIN" })
+    @RolesAllowed({"ROLE_USER", "ROLE_ADMIN" })
     public Book getBookFromFormParams(@FormParam("name") String name, @FormParam("id") long
id) {
         if (name == null || id == 0) {
             throw new RuntimeException("FormParams are not set");
@@ -57,7 +57,7 @@
     @GET
     @Path("/thosebooks/{bookId}/{id}")
     @Produces("application/xml")
-    @Secured({"ROLE_USER", "ROLE_ADMIN" })
+    @RolesAllowed({"ROLE_USER", "ROLE_ADMIN" })
     public Book getThatBook(@PathParam("bookId") Long id, @PathParam("id") String s) {
         if (s == null) {
             throw new RuntimeException();
@@ -68,7 +68,7 @@
     @GET
     @Path("/thosebooks/{bookId}/")
     @Produces("application/xml")
-    @Secured("ROLE_USER")
+    @RolesAllowed("ROLE_USER")
     public Book getThatBook(@PathParam("bookId") Long id) {
         return books.get(id);
     }
@@ -76,7 +76,7 @@
     @GET
     @Path("/thosebooks")
     @Produces("application/xml")
-    @Secured("ROLE_ADMIN")
+    @RolesAllowed("ROLE_ADMIN")
     public Book getThatBook() throws BookNotFoundFault {
         return books.get(123L);
     }

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml?rev=911402&r1=911401&r2=911402&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/resources/jaxrs_security_cglib/WEB-INF/beans.xml
Thu Feb 18 13:50:53 2010
@@ -61,7 +61,8 @@
   
   <aop:config proxy-target-class="true"/>
   
-  <security:global-method-security secured-annotations="enabled"/>
+  <security:global-method-security secured-annotations="disabled"
+            jsr250-annotations="enabled"/>
   
   <security:http auto-config='true'>
     <security:http-basic />



Mime
View raw message