mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-05 13:47:02 +02:00
check for blueprints method
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
* Added custom object support for filepicker field
|
||||
* Don't allow saving of a user with no local account file
|
||||
* Controls for `list` field were not in sync between top and bottom
|
||||
1. [](#bugfix)
|
||||
* Check
|
||||
|
||||
# v1.8.1
|
||||
## 05/15/2018
|
||||
|
||||
@@ -762,7 +762,8 @@ class AdminPlugin extends Plugin
|
||||
{
|
||||
// Special case to redirect after changing the admin route to avoid 'breaking'
|
||||
$obj = $event['object'];
|
||||
if (null !== $obj) {
|
||||
|
||||
if (null !== $obj && method_exists($obj, 'blueprints')) {
|
||||
$blueprint = $obj->blueprints()->getFilename();
|
||||
|
||||
if ($blueprint === 'admin/blueprints' && isset($obj->route) && $this->admin_route !== $obj->route) {
|
||||
|
||||
Reference in New Issue
Block a user