pnever      2004/01/26 09:32:23

  Modified:    src/webdav/server/org/apache/slide/webdav/util Tag:
                        SLIDE_2_0_RELEASE_BRANCH VersioningHelper.java
                        PropertyHelper.java
               src/conf/webapp Tag: SLIDE_2_0_RELEASE_BRANCH Domain.xml
               src/doc  Tag: SLIDE_2_0_RELEASE_BRANCH changelog.xml
               src/webdav/server/org/apache/slide/webdav/util/resourcekind
                        Tag: SLIDE_2_0_RELEASE_BRANCH
                        AbstractResourceKind.java
  Log:
  Final fixes to get the DeltaV testuite error-free (tested with TX store and
  security enabled/disabled)
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.95.2.1  +6 -14     
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java
  
  Index: VersioningHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/VersioningHelper.java,v
  retrieving revision 1.95
  retrieving revision 1.95.2.1
  diff -u -r1.95 -r1.95.2.1
  --- VersioningHelper.java     20 Jan 2004 11:46:15 -0000      1.95
  +++ VersioningHelper.java     26 Jan 2004 17:32:20 -0000      1.95.2.1
  @@ -1823,17 +1823,9 @@
           NodeLock writeLock = null;
           try {
               Enumeration lockEnum = lock.enumerateLocks(slideToken, 
revisionDescriptors.getUri());
  -            if (lockEnum != null) {
  -                String typeUri = null;
  -                NodeLock lock = null;
  -                while ( (writeLock == null) && lockEnum.hasMoreElements() ) {
  -                    lock = (NodeLock)lockEnum.nextElement();
  -                    typeUri = lock.getTypeUri();
  -                    if ( modifyContentUri.equals(typeUri) ||
  -                        modifyMetadataUri.equals(typeUri) ) {
  -                        writeLock = lock;
  -                    }
  -                }
  +            if (lockEnum != null && lockEnum.hasMoreElements()) {
  +                // there are no other types of locks beside write locks ... so take 
the first one if there
  +                writeLock = (NodeLock)lockEnum.nextElement();
               }
           }
           catch (ObjectNotFoundException e) {}
  
  
  
  1.63.2.1  +13 -4     
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.63
  retrieving revision 1.63.2.1
  diff -u -r1.63 -r1.63.2.1
  --- PropertyHelper.java       20 Jan 2004 11:46:15 -0000      1.63
  +++ PropertyHelper.java       26 Jan 2004 17:32:21 -0000      1.63.2.1
  @@ -385,13 +385,22 @@
                       Principal p = credToken.getPrincipal();
                       if( p != null )
                           result = p.getName();
  +                    else
  +                        result = SubjectNode.UNAUTHENTICATED_URI;
                   }
               }
           }
  +        // REQUIRED properties
           else if( P_PREDECESSOR_SET.equals(propName) ) {
               result = "";
           }
  -        else if( P_SUCCESSOR_SET.equals(propName) ) {
  +        else if( P_CHECKOUT_SET.equals(propName) ) {
  +            result = "";
  +        }
  +        else if( P_COMMENT.equals(propName) ) {
  +            result = "";
  +        }
  +        else if( P_LABEL_NAME_SET.equals(propName) ) {
               result = "";
           }
           return result;
  
  
  
  No                   revision
  No                   revision
  1.49.2.1  +6 -0      jakarta-slide/src/conf/webapp/Domain.xml
  
  Index: Domain.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/conf/webapp/Domain.xml,v
  retrieving revision 1.49
  retrieving revision 1.49.2.1
  diff -u -r1.49 -r1.49.2.1
  --- Domain.xml        15 Jan 2004 11:54:42 -0000      1.49
  +++ Domain.xml        26 Jan 2004 17:32:22 -0000      1.49.2.1
  @@ -184,12 +184,18 @@
                   <!-- DeltaV: default history and workspace paths -->
                   <objectnode classname="org.apache.slide.structure.SubjectNode" 
uri="/history">
                       <permission action="all" subject="unauthenticated" 
inheritable="true"/>
  +                    <permission action="/actions/write" subject="/roles/user" 
inheritable="true"/>
  +                    <permission action="/actions/read-acl" subject="owner" 
inheritable="true"/>
                   </objectnode>
                   <objectnode classname="org.apache.slide.structure.SubjectNode" 
uri="/workspace">
                       <permission action="all" subject="unauthenticated" 
inheritable="true"/>
  +                    <permission action="/actions/write" subject="/roles/user" 
inheritable="true"/>
  +                    <permission action="/actions/read-acl" subject="owner" 
inheritable="true"/>
                   </objectnode>
                   <objectnode classname="org.apache.slide.structure.SubjectNode" 
uri="/workingresource">
                       <permission action="all" subject="unauthenticated" 
inheritable="true"/>
  +                    <permission action="/actions/write" subject="/roles/user" 
inheritable="true"/>
  +                    <permission action="/actions/read-acl" subject="owner" 
inheritable="true"/>
                   </objectnode>
               </objectnode>
           </data>
  
  
  
  No                   revision
  No                   revision
  1.84.2.3  +3 -0      jakarta-slide/src/doc/changelog.xml
  
  Index: changelog.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/doc/changelog.xml,v
  retrieving revision 1.84.2.2
  retrieving revision 1.84.2.3
  diff -u -r1.84.2.2 -r1.84.2.3
  --- changelog.xml     23 Jan 2004 10:27:33 -0000      1.84.2.2
  +++ changelog.xml     26 Jan 2004 17:32:22 -0000      1.84.2.3
  @@ -15,6 +15,9 @@
   release.
        
         <changelog>
  +      <fix date="January 26, 2004" author="pnever">
  +      Final fixes to get the DeltaV testcases error-free.
  +      </fix>
                           <add date="January 22, 2004" author="pnever">
                Added means for creating principals (users, roles, groups) through the 
MKCOL or PUT methods. Note that creating and maintaining principals is out of scope of 
the ACL specification. Now, principals are automcatically provided with 
DAV:displayname (last URI segment by default) and DAV:principal element in its 
DAV:resourcetype property.
         </add>
  
  
  
  No                   revision
  No                   revision
  1.26.2.1  +7 -5      
jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/AbstractResourceKind.java
  
  Index: AbstractResourceKind.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/util/resourcekind/AbstractResourceKind.java,v
  retrieving revision 1.26
  retrieving revision 1.26.2.1
  diff -u -r1.26 -r1.26.2.1
  --- AbstractResourceKind.java 17 Jan 2004 21:48:00 -0000      1.26
  +++ AbstractResourceKind.java 26 Jan 2004 17:32:22 -0000      1.26.2.1
  @@ -74,16 +74,17 @@
   import java.util.Map;
   import java.util.Set;
   import org.apache.slide.common.NamespaceAccessToken;
  +import org.apache.slide.common.NamespaceConfig;
   import org.apache.slide.content.NodeRevisionDescriptor;
   import org.apache.slide.content.NodeRevisionDescriptors;
   import org.apache.slide.util.Configuration;
  +import org.apache.slide.util.XMLValue;
   import org.apache.slide.webdav.util.AclConstants;
   import org.apache.slide.webdav.util.BindConstants;
   import org.apache.slide.webdav.util.DaslConstants;
   import org.apache.slide.webdav.util.DeltavConstants;
   import org.apache.slide.webdav.util.UriHandler;
   import org.apache.slide.webdav.util.WebdavConstants;
  -import org.apache.slide.util.XMLValue;
   import org.jdom.Element;
   import org.jdom.JDOMException;
   
  @@ -271,6 +272,7 @@
        */
       static public ResourceKind determineResourceKind( NamespaceAccessToken 
nsaToken, String resourcePath, NodeRevisionDescriptor nrd ) {
           UriHandler uh = UriHandler.getUriHandler( resourcePath );
  +        NamespaceConfig config = nsaToken.getNamespaceConfig();
           
           if( nrd == null ) {
               return DeltavCompliantUnmappedUrlImpl.getInstance();
  @@ -293,7 +295,7 @@
           else if( nrd.exists(P_CHECKED_OUT) ) {
               return CheckedOutVersionControlledImpl.getInstance();
           }
  -        else if( nrd.propertyValueContains(P_RESOURCETYPE, E_PRINCIPAL) ) {
  +        else if( config.isPrincipal(resourcePath) ) {
               return PrincipalImpl.getInstance();
           }
           else if( nrd.propertyValueContains(P_RESOURCETYPE, E_COLLECTION) ) {
  
  
  

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

Reply via email to