pnever      2003/12/04 03:55:46

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        PropertyHelper.java
  Log:
  Fixed problems in unauthenticated mode
  
  Revision  Changes    Path
  1.60      +13 -7     
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java
  
  Index: PropertyHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/PropertyHelper.java,v
  retrieving revision 1.59
  retrieving revision 1.60
  diff -u -r1.59 -r1.60
  --- PropertyHelper.java       2 Dec 2003 14:07:02 -0000       1.59
  +++ PropertyHelper.java       4 Dec 2003 11:55:46 -0000       1.60
  @@ -1367,7 +1367,7 @@
        * @throws   LinkedObjectNotFoundException
        * @throws   ObjectNotFoundException
        */
  -    public XMLValue computeLockDiscovery(NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath, 
String serverURL) throws ServiceAccessException, LinkedObjectNotFoundException, 
ObjectNotFoundException, LockTokenNotFoundException {
  +    private XMLValue computeLockDiscovery(NodeRevisionDescriptors 
revisionDescriptors, NodeRevisionDescriptor revisionDescriptor, String contextPath, 
String serverURL) throws ServiceAccessException, LinkedObjectNotFoundException, 
ObjectNotFoundException, LockTokenNotFoundException {
           
           XMLValue xmlValue = new XMLValue();
           Lock lock = nsaToken.getLockHelper();
  @@ -1504,12 +1504,18 @@
               if( lockdiscoveryIncludesPrincipalURL ) {
                   Element principalUrl = new Element( E_PRINCIPAL_URL, DNSP);
                   activelock.addContent(principalUrl);
  +                SubjectNode snode =
  +                    SubjectNode.getSubjectNode(objectLockToken.getSubjectUri());
  +                String subjectUri = objectLockToken.getSubjectUri();
  +                if (snode == SubjectNode.UNAUTHENTICATED) {
  +                    String userspath = nsaToken.getNamespaceConfig().getUsersPath();
  +                    subjectUri = userspath+"/"+snode.toString();
  +                }
                   Element puhref = new Element(E_HREF, DNSP);
                   principalUrl.addContent(puhref);
                   
  -                puhref.setText(WebdavUtils.getAbsolutePath
  -                                   (objectLockToken.getSubjectUri(),
  -                                    contextPath, serverURL, sConf));
  +                puhref.setText(
  +                    WebdavUtils.getAbsolutePath(subjectUri, contextPath, serverURL, 
sConf));
               }
               // <<<<<<<<<< end principal-URL <<<<<<<<<<<<<<
           }
  
  
  

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

Reply via email to