1
0
mirror of https://github.com/ONLYOFFICE/onlyoffice-owncloud.git synced 2025-07-28 23:21:59 +03:00

unlock federated key

This commit is contained in:
Antipkin-A
2020-11-27 16:18:35 +03:00
committed by Sergey Linnik
parent 1c2f58a82b
commit 32f48d081e
3 changed files with 16 additions and 3 deletions

View File

@ -520,7 +520,7 @@ class CallbackController extends Controller {
if ($isForcesave
&& $file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) {
KeyManager::lockFederatedKey($file, $isForcesave);
KeyManager::lockFederatedKey($file, $isForcesave, null);
}
//lock the key when forcesave and unlock if last forcesave is broken
@ -531,6 +531,11 @@ class CallbackController extends Controller {
return $file->putContent($newData);
});
if ($isForcesave
&& $file->getStorage()->instanceOfStorage(SharingExternalStorage::class)) {
KeyManager::lockFederatedKey($file, false, $isForcesave);
}
//unlock key for future federated save
KeyManager::lock($fileId, false);
KeyManager::setForcesave($fileId, $isForcesave);