Commit fee4d305 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-1326 Added KOE_CAPABILITY_IMPERSONATE config parameter.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 91431903
...@@ -145,7 +145,7 @@ class BackendKopano implements IBackend, ISearchProvider { ...@@ -145,7 +145,7 @@ class BackendKopano implements IBackend, ISearchProvider {
// check if we are impersonating someone // check if we are impersonating someone
// $defaultUser will be used for $this->defaultStore // $defaultUser will be used for $this->defaultStore
if (stripos($user, self::IMPERSONATE_DELIM) !== false) { if (defined('KOE_CAPABILITY_IMPERSONATE') && KOE_CAPABILITY_IMPERSONATE && stripos($user, self::IMPERSONATE_DELIM) !== false) {
list($this->mainUser, $this->impersonateUser) = explode(self::IMPERSONATE_DELIM, strtolower($user)); list($this->mainUser, $this->impersonateUser) = explode(self::IMPERSONATE_DELIM, strtolower($user));
ZLog::Write(LOGLEVEL_DEBUG, sprintf("KopanoBackend->Logon(): Impersonation active - authenticating: '%s' - impersonating '%s'", $this->mainUser, $this->impersonateUser)); ZLog::Write(LOGLEVEL_DEBUG, sprintf("KopanoBackend->Logon(): Impersonation active - authenticating: '%s' - impersonating '%s'", $this->mainUser, $this->impersonateUser));
$defaultUser = $this->impersonateUser; $defaultUser = $this->impersonateUser;
......
...@@ -313,6 +313,8 @@ ...@@ -313,6 +313,8 @@
define('KOE_CAPABILITY_SIGNATURES', true); define('KOE_CAPABILITY_SIGNATURES', true);
// Delivery receipt requests // Delivery receipt requests
define('KOE_CAPABILITY_RECEIPTS', true); define('KOE_CAPABILITY_RECEIPTS', true);
// Impersonate other users
define('KOE_CAPABILITY_IMPERSONATE', true);
// To synchronize the GAB KOE, the GAB store and folderid need to be specified. // To synchronize the GAB KOE, the GAB store and folderid need to be specified.
// Use the gab-sync script to generate this data. The name needs to // Use the gab-sync script to generate this data. The name needs to
......
...@@ -50,6 +50,7 @@ class Settings extends RequestProcessor { ...@@ -50,6 +50,7 @@ class Settings extends RequestProcessor {
if (defined('KOE_CAPABILITY_SECONDARYCONTACTS') && KOE_CAPABILITY_SECONDARYCONTACTS) $cap[] = "secondarycontacts"; if (defined('KOE_CAPABILITY_SECONDARYCONTACTS') && KOE_CAPABILITY_SECONDARYCONTACTS) $cap[] = "secondarycontacts";
if (defined('KOE_CAPABILITY_SIGNATURES') && KOE_CAPABILITY_SIGNATURES) $cap[] = "signatures"; if (defined('KOE_CAPABILITY_SIGNATURES') && KOE_CAPABILITY_SIGNATURES) $cap[] = "signatures";
if (defined('KOE_CAPABILITY_RECEIPTS') && KOE_CAPABILITY_RECEIPTS) $cap[] = "receipts"; if (defined('KOE_CAPABILITY_RECEIPTS') && KOE_CAPABILITY_RECEIPTS) $cap[] = "receipts";
if (defined('KOE_CAPABILITY_IMPERSONATE') && KOE_CAPABILITY_IMPERSONATE) $cap[] = "impersonate";
self::$specialHeaders = array(); self::$specialHeaders = array();
self::$specialHeaders[] = "X-Push-Capabilities: ". implode(",", $cap); self::$specialHeaders[] = "X-Push-Capabilities: ". implode(",", $cap);
......
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