Merge pull request #63 from pranavk/usernames
Register the change under user's name when saving the document
This commit is contained in:
Коммит
75f0423957
|
@ -177,6 +177,14 @@ class WopiController extends Controller {
|
|||
// Setup the FS which is needed to emit hooks (versioning).
|
||||
\OC_Util::tearDownFS();
|
||||
\OC_Util::setupFS($res['owner']);
|
||||
|
||||
// Set the user to register the change under his name
|
||||
$editor = \OC::$server->getUserManager()->get($res['editor']);
|
||||
if (is_null($editor)) {
|
||||
throw new \OC\User\NoUserException("User " . $res['editor'] . "not found.");
|
||||
}
|
||||
\OC::$server->getUserSession()->setUser($editor);
|
||||
|
||||
$file->putContent($content);
|
||||
return new JSONResponse();
|
||||
} catch (\Exception $e) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче