diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index cdaf811..5a2bd40 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,10 +1,13 @@ Changelog ========= -0.13.1 - Unreleased ----------------------- +0.13.1 - July 29, 2021 +----------------------- - Enh #114: Fix for PHP8 - Deprecate required parameters after optional parameters - Fix #117: CLI error when no REST module is installed +- Fix: Race condition on newly created files (import vs. oo) +- Enh: Updated translations + 0.13.0 - April 9, 2021 ---------------------- diff --git a/models/FileSystemItem.php b/models/FileSystemItem.php index 205dff9..dac4eb2 100644 --- a/models/FileSystemItem.php +++ b/models/FileSystemItem.php @@ -233,6 +233,11 @@ public static function getItemById($itemId) public function canEdit(User $user) { + // Fixes race condition on newly created files (import vs. onlyoffice) + if ($this->content->container === null && $this->content->isNewRecord) { + return true; + } + if ($this->content->container->permissionManager->can(new ManageFiles())) { return true; } @@ -240,4 +245,4 @@ public function canEdit(User $user) return false; } -} +} \ No newline at end of file