Commit 644b5407 authored by Manfred Kutas's avatar Manfred Kutas

ZP-1063 Items marked as private are shown in shared folders.

Released under the Affero GNU General Public License (AGPL) version 3.
parent fac35733
...@@ -131,6 +131,15 @@ class PHPWrapper { ...@@ -131,6 +131,15 @@ class PHPWrapper {
$mapimessage = mapi_msgstore_openentry($this->store, $entryid); $mapimessage = mapi_msgstore_openentry($this->store, $entryid);
try { try {
ZLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportMessageChange(): Getting message from MAPIProvider, sourcekey: '%s', parentsourcekey: '%s', entryid: '%s'", bin2hex($sourcekey), bin2hex($parentsourcekey), bin2hex($entryid))); ZLog::Write(LOGLEVEL_DEBUG, sprintf("PHPWrapper->ImportMessageChange(): Getting message from MAPIProvider, sourcekey: '%s', parentsourcekey: '%s', entryid: '%s'", bin2hex($sourcekey), bin2hex($parentsourcekey), bin2hex($entryid)));
// do not send private messages from shared folders to the device
$sensitivity = mapi_getprops($mapimessage, array(PR_SENSITIVITY));
$folderOrigin = Utils::GetFolderOriginFromId(ZPush::GetDeviceManager()->GetFolderIdForBackendId(bin2hex($this->folderid)));
if ($folderOrigin != 'user' && isset($sensitivity[PR_SENSITIVITY]) && $sensitivity[PR_SENSITIVITY] >= SENSITIVITY_PRIVATE) {
ZLog::Write(LOGLEVEL_DEBUG, "PHPWrapper->ImportMessageChange(): ignoring private message from a shared folder");
return SYNC_E_IGNORE;
}
$message = $this->mapiprovider->GetMessage($mapimessage, $this->contentparameters); $message = $this->mapiprovider->GetMessage($mapimessage, $this->contentparameters);
} }
catch (SyncObjectBrokenException $mbe) { catch (SyncObjectBrokenException $mbe) {
......
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