Commit 04edd24d authored by Etienne CHAMPETIER's avatar Etienne CHAMPETIER

ZP-641 make backend permanent storage per device and user.

Released under the Affero GNU General Public License (AGPL) version 3.

contrary to what doc says (InitializePermanentStorage)
backend permanent storage is only per device

This fixes problem with multiple account using imap backend
on the same device
Signed-off-by: 's avatarEtienne CHAMPETIER <champetier.etienne@gmail.com>
parent c42848ed
...@@ -300,7 +300,7 @@ class StateManager { ...@@ -300,7 +300,7 @@ class StateManager {
return $this->statemachine->GetState($this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, $this->uuid, $this->oldStateCounter, $this->deleteOldStates); return $this->statemachine->GetState($this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, $this->uuid, $this->oldStateCounter, $this->deleteOldStates);
} }
else { else {
return $this->statemachine->GetState($this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, false, $this->device->GetFirstSyncTime()); return $this->statemachine->GetState($this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, sha1(Request::GetAuthUser()), $this->device->GetFirstSyncTime());
} }
} }
...@@ -323,7 +323,7 @@ class StateManager { ...@@ -323,7 +323,7 @@ class StateManager {
return $this->statemachine->SetState($data, $this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, $this->uuid, $this->newStateCounter); return $this->statemachine->SetState($data, $this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, $this->uuid, $this->newStateCounter);
} }
else { else {
return $this->statemachine->SetState($data, $this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, false, $this->device->GetFirstSyncTime()); return $this->statemachine->SetState($data, $this->device->GetDeviceId(), IStateMachine::BACKENDSTORAGE, sha1(Request::GetAuthUser()), $this->device->GetFirstSyncTime());
} }
} }
......
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