Skip to content

Commit

Permalink
Fixed Failed to save entry: Forbidden when moving a page to a visib…
Browse files Browse the repository at this point in the history
…le page [#3389]
  • Loading branch information
mahagr committed Jul 1, 2021
1 parent da8e374 commit 9aa6f5b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@
* Fixed error when using Flex `SimpleStorage` with no entries
* Fixed page search to include slug field [#3316](https://github.com/getgrav/grav/issues/3316)
* Fixed Admin becoming unusable when GPM cannot be reached [#3383](https://github.com/getgrav/grav/issues/3383)
* Fixed `Failed to save entry: Forbidden` when moving a page to a visible page [#3389](https://github.com/getgrav/grav/issues/3389)

# v1.7.17
## 06/15/2021
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Flex/Types/Pages/PageObject.php
Expand Up @@ -273,7 +273,7 @@ public function check(UserInterface $user = null): void
$parentKey = $this->getProperty('parent_key');

/** @var PageObject|null $parent */
$parent = $this->getFlexDirectory()->getObject($parentKey);
$parent = $this->getFlexDirectory()->getObject($parentKey, 'storage_key');
if (!$parent || !$parent->isAuthorized('create', null, $user)) {
throw new \RuntimeException('Forbidden', 403);
}
Expand Down

0 comments on commit 9aa6f5b

Please sign in to comment.