You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by pn...@apache.org on 2002/09/20 17:21:27 UTC

cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/method CopyMethod.java

pnever      2002/09/20 08:21:27

  Modified:    src/webdav/server/org/apache/slide/webdav/method
                        CopyMethod.java
  Log:
  COPY onto existing WS is not anymore restricted
  
  Revision  Changes    Path
  1.48      +16 -3     jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java
  
  Index: CopyMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/CopyMethod.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- CopyMethod.java	23 Aug 2002 14:25:20 -0000	1.47
  +++ CopyMethod.java	20 Sep 2002 15:21:27 -0000	1.48
  @@ -198,9 +198,22 @@
           // check destination URI
           UriHandler destinationUriHandler = UriHandler.getUriHandler(destinationUri);
           if (destinationUriHandler.isRestrictedUri()) {
  +            boolean sendError = true;
  +            if( destinationUriHandler.isWorkspaceUri()        ||
  +                destinationUriHandler.isWorkingresourceUri()
  +              ) {
  +                // COPY on existing WSs or WRs is *not* restricted !!!
  +                try {
  +                    content.retrieve(slideToken, destinationUri);
  +                    sendError = false;
  +                }
  +                catch( Exception x ) {};
  +            }
  +            if( sendError ) {
               int statusCode = WebdavStatus.SC_FORBIDDEN;
               sendError( statusCode, getClass().getName()+".restrictedDestinationUri", new Object[]{destinationUri} );
               throw new WebdavException( statusCode );
  +        }
           }
   
           try {
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>