Commit 56f45944 authored by Manfred Kutas's avatar Manfred Kutas

ZP-994 On missing permissions WebserviceInfo->ListUserFolders() returns

own folders.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 4ed559d3
...@@ -57,13 +57,15 @@ class WebserviceInfo { ...@@ -57,13 +57,15 @@ class WebserviceInfo {
$hasRights = ZPush::GetBackend()->Setup($user); $hasRights = ZPush::GetBackend()->Setup($user);
ZLog::Write(LOGLEVEL_INFO, sprintf("WebserviceInfo::ListUserFolders(): permissions to open store '%s': %s", $user, Utils::PrintAsString($hasRights))); ZLog::Write(LOGLEVEL_INFO, sprintf("WebserviceInfo::ListUserFolders(): permissions to open store '%s': %s", $user, Utils::PrintAsString($hasRights)));
$folders = ZPush::GetBackend()->GetHierarchy(); if ($hasRights) {
ZPush::GetTopCollector()->AnnounceInformation(sprintf("Retrieved details of %d folders", count($folders)), true); $folders = ZPush::GetBackend()->GetHierarchy();
ZPush::GetTopCollector()->AnnounceInformation(sprintf("Retrieved details of %d folders", count($folders)), true);
foreach ($folders as $folder) { foreach ($folders as $folder) {
$folder->StripData(); $folder->StripData();
unset($folder->Store, $folder->flags, $folder->content, $folder->NoBackendFolder); unset($folder->Store, $folder->flags, $folder->content, $folder->NoBackendFolder);
$output[] = $folder; $output[] = $folder;
}
} }
return $output; return $output;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment