Commit ea10a2b2 authored by Manfred Kutas's avatar Manfred Kutas

ZP-748 Read incoming RightsManagementInformation request in Settings,

added SyncRightsManagement class.

Released under the Affero GNU General Public License (AGPL) version 3.
parent e804a6f5
...@@ -86,6 +86,9 @@ class Settings extends RequestProcessor { ...@@ -86,6 +86,9 @@ class Settings extends RequestProcessor {
if (self::$decoder->getElementStartTag(SYNC_SETTINGS_USERINFORMATION)) { if (self::$decoder->getElementStartTag(SYNC_SETTINGS_USERINFORMATION)) {
$propertyName = SYNC_SETTINGS_USERINFORMATION; $propertyName = SYNC_SETTINGS_USERINFORMATION;
} }
if (self::$decoder->getElementStartTag(SYNC_SETTINGS_RIGHTSMANAGEMENTINFORMATION)) {
$propertyName = SYNC_SETTINGS_RIGHTSMANAGEMENTINFORMATION;
}
//TODO - check if it is necessary //TODO - check if it is necessary
//no property name available - break //no property name available - break
if (!$propertyName) if (!$propertyName)
...@@ -93,7 +96,7 @@ class Settings extends RequestProcessor { ...@@ -93,7 +96,7 @@ class Settings extends RequestProcessor {
//the property name is followed by either get or set //the property name is followed by either get or set
if (self::$decoder->getElementStartTag(SYNC_SETTINGS_GET)) { if (self::$decoder->getElementStartTag(SYNC_SETTINGS_GET)) {
//get is only available for OOF and user information //get is available for OOF (AS 12), user information (AS 12) and rights management (AS 14.1)
switch ($propertyName) { switch ($propertyName) {
case SYNC_SETTINGS_OOF: case SYNC_SETTINGS_OOF:
$oofGet = new SyncOOF(); $oofGet = new SyncOOF();
...@@ -106,6 +109,9 @@ class Settings extends RequestProcessor { ...@@ -106,6 +109,9 @@ class Settings extends RequestProcessor {
$userInformation = new SyncUserInformation(); $userInformation = new SyncUserInformation();
break; break;
case SYNC_SETTINGS_RIGHTSMANAGEMENTINFORMATION:
break;
default: default:
//TODO: a special status code needed? //TODO: a special status code needed?
ZLog::Write(LOGLEVEL_WARN, sprintf ("This property ('%s') is not allowed to use get in request", $propertyName)); ZLog::Write(LOGLEVEL_WARN, sprintf ("This property ('%s') is not allowed to use get in request", $propertyName));
......
<?php
/***********************************************
* File : syncrightsmanagements.php
* Project : Z-Push
* Descr : WBXML rights management entities that can be
* parsed directly (as a stream) from WBXML.
* It is automatically decoded
* according to $mapping,
* and the Sync WBXML mappings
*
* Created : 15.06.2017
*
* Copyright 2017 Zarafa Deutschland GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Consult LICENSE file for details
************************************************/
class SyncRightsManagement extends SyncObject {
public function __construct() {
$mapping = array (
);
parent::__construct($mapping);
}
}
\ No newline at end of file
...@@ -160,6 +160,7 @@ return array( ...@@ -160,6 +160,7 @@ return array(
'SyncResolveRecipientsOptions' => $baseDir . '/lib/syncobjects/syncresolverecipientsoptions.php', 'SyncResolveRecipientsOptions' => $baseDir . '/lib/syncobjects/syncresolverecipientsoptions.php',
'SyncResolveRecipientsPicture' => $baseDir . '/lib/syncobjects/syncresolverecipientspicture.php', 'SyncResolveRecipientsPicture' => $baseDir . '/lib/syncobjects/syncresolverecipientspicture.php',
'SyncResolveRecipientsResponse' => $baseDir . '/lib/syncobjects/syncresolverecipientsresponse.php', 'SyncResolveRecipientsResponse' => $baseDir . '/lib/syncobjects/syncresolverecipientsresponse.php',
'SyncRightsManagement' => $baseDir . '/lib/syncobjects/syncrightsmanagement.php',
'SyncSendMail' => $baseDir . '/lib/syncobjects/syncsendmail.php', 'SyncSendMail' => $baseDir . '/lib/syncobjects/syncsendmail.php',
'SyncSendMailSource' => $baseDir . '/lib/syncobjects/syncsendmailsource.php', 'SyncSendMailSource' => $baseDir . '/lib/syncobjects/syncsendmailsource.php',
'SyncTask' => $baseDir . '/lib/syncobjects/synctask.php', 'SyncTask' => $baseDir . '/lib/syncobjects/synctask.php',
......
...@@ -167,6 +167,7 @@ class ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f ...@@ -167,6 +167,7 @@ class ComposerStaticInitd6749fc2fb9944bbe86b2b7d79a7852f
'SyncResolveRecipientsOptions' => __DIR__ . '/../..' . '/lib/syncobjects/syncresolverecipientsoptions.php', 'SyncResolveRecipientsOptions' => __DIR__ . '/../..' . '/lib/syncobjects/syncresolverecipientsoptions.php',
'SyncResolveRecipientsPicture' => __DIR__ . '/../..' . '/lib/syncobjects/syncresolverecipientspicture.php', 'SyncResolveRecipientsPicture' => __DIR__ . '/../..' . '/lib/syncobjects/syncresolverecipientspicture.php',
'SyncResolveRecipientsResponse' => __DIR__ . '/../..' . '/lib/syncobjects/syncresolverecipientsresponse.php', 'SyncResolveRecipientsResponse' => __DIR__ . '/../..' . '/lib/syncobjects/syncresolverecipientsresponse.php',
'SyncRightsManagement' => __DIR__ . '/../..' . '/lib/syncobjects/syncrightsmanagement.php',
'SyncSendMail' => __DIR__ . '/../..' . '/lib/syncobjects/syncsendmail.php', 'SyncSendMail' => __DIR__ . '/../..' . '/lib/syncobjects/syncsendmail.php',
'SyncSendMailSource' => __DIR__ . '/../..' . '/lib/syncobjects/syncsendmailsource.php', 'SyncSendMailSource' => __DIR__ . '/../..' . '/lib/syncobjects/syncsendmailsource.php',
'SyncTask' => __DIR__ . '/../..' . '/lib/syncobjects/synctask.php', 'SyncTask' => __DIR__ . '/../..' . '/lib/syncobjects/synctask.php',
......
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