mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 21:51:32 +00:00
PROPFIND returns same documents like GET
PROPFIND previously returned all documents while GET returned only released documents. They now both return only released documents.
This commit is contained in:
parent
9a0d6cb3b8
commit
a7af6656b4
|
@ -239,7 +239,19 @@ class HTTP_WebDAV_Server_SeedDMS extends HTTP_WebDAV_Server
|
||||||
// TODO recursion needed if "Depth: infinite"
|
// TODO recursion needed if "Depth: infinite"
|
||||||
}
|
}
|
||||||
$documents = $obj->getDocuments();
|
$documents = $obj->getDocuments();
|
||||||
$documents = SeedDMS_Core_DMS::filterAccess($documents, $this->user, M_READ);
|
$docs = SeedDMS_Core_DMS::filterAccess($documents, $this->user, M_READ);
|
||||||
|
if(!$this->user->isAdmin()) {
|
||||||
|
$documents = array();
|
||||||
|
foreach($docs as $document) {
|
||||||
|
$lc = $document->getLatestContent();
|
||||||
|
$status = $lc->getStatus();
|
||||||
|
if($status['status'] == S_RELEASED) {
|
||||||
|
$documents[] = $document;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$documents = $docs;
|
||||||
|
}
|
||||||
if ($documents) {
|
if ($documents) {
|
||||||
// ok, now get all its contents
|
// ok, now get all its contents
|
||||||
foreach($documents as $document) {
|
foreach($documents as $document) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user