Regression from beta.8: Deleting files other than from plugins/themes fail on error

This commit is contained in:
Matias Griese
2019-04-09 10:36:13 +03:00
parent 5c832dd376
commit 20a596f18f
2 changed files with 7 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
* Fixed user edit links if Flex Objects plugin is installed but user isn't Flex User * Fixed user edit links if Flex Objects plugin is installed but user isn't Flex User
* Fixed deprecated `sameas()` Twig test * Fixed deprecated `sameas()` Twig test
* Regression: Fixed lost user access when saving user profile without super user permissions [#1639](https://github.com/getgrav/grav-plugin-admin/issues/1639) * Regression: Fixed lost user access when saving user profile without super user permissions [#1639](https://github.com/getgrav/grav-plugin-admin/issues/1639)
* Regression from beta.8: Deleting files other than from plugins/themes fail on error
# v1.9.0-rc.4 # v1.9.0-rc.4
## 03/20/2019 ## 03/20/2019

View File

@@ -941,9 +941,13 @@ class AdminBaseController
$settings = (object)$blueprints->schema()->getProperty($field); $settings = (object)$blueprints->schema()->getProperty($field);
} else { } else {
$page = null; $page = null;
if ($type === 'user') {
$settings = (object)$this->admin->blueprints($blueprint)->schema()->getProperty($field);
} else {
$obj = $this->grav[$type]->get(Utils::substrToString($blueprint, '/')); $obj = $this->grav[$type]->get(Utils::substrToString($blueprint, '/'));
$settings = (object)$obj->blueprints()->schema()->getProperty($field); $settings = (object)$obj->blueprints()->schema()->getProperty($field);
} }
}
// Get destination // Get destination
if ($this->grav['locator']->isStream($settings->destination)) { if ($this->grav['locator']->isStream($settings->destination)) {