pnever      2004/07/05 05:31:51

  Modified:    proposals/tamino/src/store/org/apache/slide/store/tamino/security/admin
                        Tag: TWS421_BRANCH URMActionsStore.java
                        URMUserDBStore.java
  Log:
  Fixed bug: actions cache of SecurityImpl was not loaded if security was
  switched off
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.4.1   +6 -5      
jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/security/admin/URMActionsStore.java
  
  Index: URMActionsStore.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/security/admin/URMActionsStore.java,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- URMActionsStore.java      25 Mar 2004 16:18:03 -0000      1.1
  +++ URMActionsStore.java      5 Jul 2004 12:31:50 -0000       1.1.4.1
  @@ -69,7 +69,8 @@
           throws ServiceAccessException, ObjectNotFoundException {
           
           if ( ! org.apache.slide.util.Configuration.useIntegratedSecurity() ) {
  -            return super.retrieveObject(uri);
  +            ObjectNode result = super.retrieveObject(uri);
  +             return result;
           }
           logEnter("retrieveObject",uri);
           String uriStr = uri.toString();
  
  
  
  1.1.4.1   +58 -26    
jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/security/admin/URMUserDBStore.java
  
  Index: URMUserDBStore.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-slide/proposals/tamino/src/store/org/apache/slide/store/tamino/security/admin/URMUserDBStore.java,v
  retrieving revision 1.1
  retrieving revision 1.1.4.1
  diff -u -r1.1 -r1.1.4.1
  --- URMUserDBStore.java       25 Mar 2004 16:18:03 -0000      1.1
  +++ URMUserDBStore.java       5 Jul 2004 12:31:50 -0000       1.1.4.1
  @@ -223,28 +223,46 @@
        
        throw new ServiceAccessException( this,
        new ForbiddenException(uri.toString(), new XForbiddenException( "access is 
forbidden" )) );
  -    
  +     
        }
        */
       public void createRevisionDescriptors(Uri uri, NodeRevisionDescriptors 
revisionDescriptors)
           throws ServiceAccessException {
           logEnter("createRevisionDescriptors", uri);
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            super.createRevisionDescriptors(uri, revisionDescriptors);
  +            return;
  +        }
       }
       
       public synchronized NodeRevisionDescriptors retrieveRevisionDescriptors(Uri uri)
           throws ServiceAccessException, RevisionDescriptorNotFoundException {
           
           logEnter("retrieveRevisionDescriptors", uri);
  -        return XFactory.createNRDs(uri.toString());
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            NodeRevisionDescriptors result = super.retrieveRevisionDescriptors(uri);
  +            return result;
  +        }
  +        else {
  +            return XFactory.createNRDs(uri.toString());
  +        }
       }
       
       public void storeRevisionDescriptors(Uri uri, NodeRevisionDescriptors 
revisionDescriptors)
           throws ServiceAccessException, RevisionDescriptorNotFoundException {
           logEnter("storeRevisionDescriptors", uri);
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            super.storeRevisionDescriptors(uri, revisionDescriptors);
  +            return;
  +        }
       }
       
       public synchronized void removeRevisionDescriptors(Uri uri) throws 
ServiceAccessException {
           logEnter("removeRevisionDescriptors",uri);
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            super.removeRevisionDescriptors(uri);
  +            return;
  +        }
       }
       
       public synchronized NodeRevisionDescriptor retrieveRevisionDescriptor
  @@ -252,25 +270,39 @@
           throws ServiceAccessException, RevisionDescriptorNotFoundException {
           
           logEnter("retrieveRevisionDescriptor", uri);
  -        return XFactory.createNRD(uri.toString(), COLLECTION);
  -        
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            NodeRevisionDescriptor result = super.retrieveRevisionDescriptor(uri, 
revisionNumber);
  +            return result;
  +        }
  +        else {
  +            return XFactory.createNRD(uri.toString(), COLLECTION);
  +        }
       }
       
       public void createRevisionDescriptor(Uri uri, NodeRevisionDescriptor 
revisionDescriptor)
           throws ServiceAccessException {
           logEnter("createRevisionDescriptor", uri);
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            super.createRevisionDescriptor(uri, revisionDescriptor);
  +            return;
  +        }
       }
       
       public synchronized void removeRevisionDescriptor(Uri uri, NodeRevisionNumber 
number)
           throws ServiceAccessException {
           logEnter("removeRevisionDescriptor",uri);
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            super.removeRevisionDescriptor(uri, number);
  +            return;
  +        }
       }
       
       public void storeRevisionDescriptor
           (Uri uri, NodeRevisionDescriptor revisionDescriptor)
           throws ServiceAccessException, RevisionDescriptorNotFoundException {
           logEnter("storeRevisionDescriptor",uri);
  -        if ( ! org.apache.slide.util.Configuration.useIntegratedSecurity() ) {
  +        if (! org.apache.slide.util.Configuration.useIntegratedSecurity()) {
  +            super.storeRevisionDescriptor(uri, revisionDescriptor);
               return;
           }
           if ( getPrincipal() == null ) {
  @@ -502,7 +534,7 @@
       void insertPrivilegememberSet(NodeRevisionDescriptor nrd, String path, Set set)
           throws ServiceAccessException {
           try {
  -//          insertSubjectProperty(nrd, PRIVILEGE_MEMBER_SET, 
buildHrefOfMemeber(null, path, set) ,false);
  +            //          insertSubjectProperty(nrd, PRIVILEGE_MEMBER_SET, 
buildHrefOfMemeber(null, path, set) ,false);
               NodeProperty subjectsProperty = new 
NodeProperty(PRIVILEGE_MEMBER_SET,buildHrefOfMemeber(null, path, set),
                                                                "DAV:", "", false);
               nrd.setProperty(subjectsProperty);
  @@ -582,32 +614,32 @@
           }
           return value;
       }
  -        
  +    
       public void putLock(Uri uri, NodeLock lock) throws ServiceAccessException {
  -       throw new ServiceAccessException(this,
  -                 new ForbiddenException(uri.toString(),
  -                        new XForbiddenException("LOCK not allowed in security 
store")));
  +        throw new ServiceAccessException(this,
  +                                         new ForbiddenException(uri.toString(),
  +                                                                new 
XForbiddenException("LOCK not allowed in security store")));
       }
  -
  +    
       public void renewLock(Uri uri, NodeLock lock)
  -    throws ServiceAccessException, LockTokenNotFoundException {
  +        throws ServiceAccessException, LockTokenNotFoundException {
           throw new ServiceAccessException(this,
  -                 new ForbiddenException(uri.toString(),
  -                        new XForbiddenException("LOCK not allowed in security 
store")));
  +                                         new ForbiddenException(uri.toString(),
  +                                                                new 
XForbiddenException("LOCK not allowed in security store")));
       }
  -
  +    
       public void removeLock(Uri uri, NodeLock lock)
  -    throws ServiceAccessException, LockTokenNotFoundException {
  +        throws ServiceAccessException, LockTokenNotFoundException {
           throw new ServiceAccessException(this,
  -                 new ForbiddenException(uri.toString(),
  -                        new XForbiddenException("LOCK not allowed in security 
store")));
  +                                         new ForbiddenException(uri.toString(),
  +                                                                new 
XForbiddenException("LOCK not allowed in security store")));
       }
  -  
  +    
       public void killLock(Uri uri, NodeLock lock)
  -    throws ServiceAccessException, LockTokenNotFoundException {
  +        throws ServiceAccessException, LockTokenNotFoundException {
           throw new ServiceAccessException(this,
  -                 new ForbiddenException(uri.toString(),
  -                        new XForbiddenException("LOCK not allowed in security 
store")));
  +                                         new ForbiddenException(uri.toString(),
  +                                                                new 
XForbiddenException("LOCK not allowed in security store")));
       }
       
       public synchronized Enumeration enumerateLocks(Uri uri) throws 
ServiceAccessException {
  
  
  

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

Reply via email to