Skip to content

Commit

Permalink
Make sure proper user data is available for storages without a owner
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Nov 14, 2019
1 parent 2457828 commit 36d22c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions controller/callbackcontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ public function emptyfile($doc) {
* @CORS
*/
public function track($doc, $users, $key, $status, $url, $token) {
\OC_User::setIncognitoMode(true);

list ($hashData, $error) = $this->crypt->ReadHash($doc);
if ($hashData === NULL) {
Expand Down Expand Up @@ -403,6 +404,9 @@ public function track($doc, $users, $key, $status, $url, $token) {

\OC_Util::tearDownFS();
if (!empty($userId)) {
// Set the current user as it is used by the files_version storage to obtain the user
// if no owner has been found e.g. for global external storages
\OC::$server->getUserSession()->setUser($this->userManager->get($ownerId));
\OC_Util::setupFS($userId);
}

Expand Down

0 comments on commit 36d22c4

Please sign in to comment.