dirkv 01/07/18 03:37:37
Modified: src/webdav/server/org/apache/slide/webdav/method
AclMethod.java
Log:
webdav all principal == slide nobody
(see PropFindMethod:writePrincipal)
Revision Changes Path
1.6 +13 -15
jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java
Index: AclMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AclMethod.java 2001/07/13 10:40:34 1.5
+++ AclMethod.java 2001/07/18 10:37:37 1.6
@@ -1,7 +1,7 @@
/*
- * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java,v
1.5 2001/07/13 10:40:34 dirkv Exp $
- * $Revision: 1.5 $
- * $Date: 2001/07/13 10:40:34 $
+ * $Header:
/home/cvs/jakarta-slide/src/webdav/server/org/apache/slide/webdav/method/AclMethod.java,v
1.6 2001/07/18 10:37:37 dirkv Exp $
+ * $Revision: 1.6 $
+ * $Date: 2001/07/18 10:37:37 $
*
* ====================================================================
*
@@ -457,22 +457,20 @@
*
* @return the URI of the principal
*/
- protected String parsePrincipal(Element principal)
- throws WebdavException {
- NodeList hrefList =
- principal.getElementsByTagNameNS(NodeProperty.DEFAULT_NAMESPACE,
- "href");
+ protected String parsePrincipal(Element principal) throws WebdavException {
+
+ // FIXME: make constants and make sure they are used in
+ // AclMethod:parsePrincipal and PropFindMethod:writePrincipal
+ NodeList hrefList =
principal.getElementsByTagNameNS(NodeProperty.DEFAULT_NAMESPACE, "href");
if (hrefList.getLength() == 1) {
Element href = (Element) hrefList.item(0);
if (href.getFirstChild().getNodeType() == Node.TEXT_NODE)
return getSlidePath(href.getFirstChild().getNodeValue());
- } else if (hasChild(principal, NodeProperty.DEFAULT_NAMESPACE,
- "all")) {
- return "/";
- } else if (hasChild(principal, NodeProperty.DEFAULT_NAMESPACE,
- "unauthenticated")) {
- return token.getNamespaceConfig().getUsersPath() + "/"
- + token.getNamespaceConfig().getGuestPath();
+ } else if (hasChild(principal, NodeProperty.DEFAULT_NAMESPACE, "all")) {
+ return "nobody";
+ } else if (hasChild(principal, NodeProperty.DEFAULT_NAMESPACE,
"unauthenticated")) {
+ return token.getNamespaceConfig().getUsersPath() + "/" +
+ token.getNamespaceConfig().getGuestPath();
}
throw new WebdavException(WebdavStatus.SC_BAD_REQUEST);
}