"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "system/src/Grav/Common/Flex/Types/Pages/PageObject.php" between
grav-v1.7.17.zip and grav-v1.7.18.zip

About: Grav is a fast, simple, and flexible flat-file based CMS platform (using YAML and PHP). Contents are just simple markdown files in folders with optional extensions via API and hooks.

PageObject.php  (grav-v1.7.17):PageObject.php  (grav-v1.7.18)
skipping to change at line 276 skipping to change at line 276
* @param UserInterface|null $user * @param UserInterface|null $user
*/ */
public function check(UserInterface $user = null): void public function check(UserInterface $user = null): void
{ {
parent::check($user); parent::check($user);
if ($user && $this->isMoved()) { if ($user && $this->isMoved()) {
$parentKey = $this->getProperty('parent_key'); $parentKey = $this->getProperty('parent_key');
/** @var PageObject|null $parent */ /** @var PageObject|null $parent */
$parent = $this->getFlexDirectory()->getObject($parentKey); $parent = $this->getFlexDirectory()->getObject($parentKey, 'storage_ key');
if (!$parent || !$parent->isAuthorized('create', null, $user)) { if (!$parent || !$parent->isAuthorized('create', null, $user)) {
throw new \RuntimeException('Forbidden', 403); throw new \RuntimeException('Forbidden', 403);
} }
} }
} }
/** /**
* @param array|bool $reorder * @param array|bool $reorder
* @return FlexObject|FlexObjectInterface * @return FlexObject|FlexObjectInterface
*/ */
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)