From a1c720d92b208d67ec0cc1bceef6cd2570d44865 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Thu, 18 Mar 2010 20:01:24 +1300 Subject: [PATCH] Catch the privileges on resources via a bound ticket. --- inc/DAVResource.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/DAVResource.php b/inc/DAVResource.php index 16c04be3..ca3dc8f8 100644 --- a/inc/DAVResource.php +++ b/inc/DAVResource.php @@ -572,7 +572,7 @@ EOQRY; $this->privileges = $this->collection->path_privs; if ( is_string($this->privileges) ) $this->privileges = bindec( $this->privileges ); - if ( isset($request->ticket) && $request->ticket->MatchesPath($this->dav_name) ) { + if ( isset($request->ticket) && $request->ticket->MatchesPath($this->bound_from()) ) { $this->privileges |= $request->ticket->privileges(); dbg_error_log( 'DAVResource', 'Applying permissions for ticket "%s" now: %s', $request->ticket->id(), decbin($this->privileges) ); } @@ -580,7 +580,7 @@ EOQRY; if ( isset($this->tickets) ) { if ( !isset($this->resource_id) ) $this->FetchResource(); foreach( $this->tickets AS $k => $ticket ) { - if ( $ticket->MatchesResource($this->resource_id) || $ticket->MatchesPath($this->dav_name) ) { + if ( $ticket->MatchesResource($this->resource_id()) || $ticket->MatchesPath($this->bound_from()) ) { $this->privileges |= $ticket->privileges(); dbg_error_log( 'DAVResource', 'Applying permissions for ticket "%s" now: %s', $ticket->id(), decbin($this->privileges) ); } @@ -998,7 +998,7 @@ EOQRY; /** - * Returns the principal-URL for this resource + * Returns the unique_tag (ETag or getctag) for this resource */ function unique_tag() { if ( isset($this->unique_tag) ) return $this->unique_tag;