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 ju...@apache.org on 2003/03/25 08:16:12 UTC

cvs commit: jakarta-slide/src/webdav/server/org/apache/slide/webdav/util PropertyHelper.java

juergen     2003/03/24 23:16:12

  Modified:    src/webdav/server/org/apache/slide/webdav/util
                        PropertyHelper.java
  Log:
  added the feature to allow user defined privileges. I added this feature with a switch (allow_user_privileges) and switched it off in the CVS so that the behavior does not change. (Eckehard)
  
  Revision  Changes    Path
  1.43      +9 -3      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.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- PropertyHelper.java	14 Feb 2003 14:34:37 -0000	1.42
  +++ PropertyHelper.java	25 Mar 2003 07:16:12 -0000	1.43
  @@ -1773,6 +1773,7 @@
                       
                       boolean isAll = isRead && isWrite && isReadAcl && isWriteAcl;
                       
  +                    boolean isUnknown = !(isRead || isWrite || isReadAcl || isWriteAcl);
                       
                       // start generating XML
                       Element ace = new Element(E_ACE, NamespaceCache.DEFAULT_NAMESPACE);
  @@ -1835,6 +1836,11 @@
                                   permissionElement.addContent(createPrivilege(E_GRANT_PERMISSION, false));
                               if (isRevokePermission)
                                   permissionElement.addContent(createPrivilege(E_REVOKE_PERMISSION, false));
  +                        }
  +                        if (isUnknown) {
  +                            int actionIndex = action.lastIndexOf("/");
  +                            String unkonwnPrivilege = action.substring(actionIndex+1);
  +                            permissionElement.addContent(createPrivilege(unkonwnPrivilege, true));
                           }
                       }
                       
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org