From 8d0e57c95e429090715b2f753d707bad1c4d0606 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Tue, 29 Sep 2015 17:13:45 +0200 Subject: [PATCH] NavigationController: Require parameter type and owner in action unshare refs #10246 --- application/controllers/NavigationController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/controllers/NavigationController.php b/application/controllers/NavigationController.php index b7d0aa0d6..26776e5da 100644 --- a/application/controllers/NavigationController.php +++ b/application/controllers/NavigationController.php @@ -364,9 +364,13 @@ class NavigationController extends Controller $this->assertPermission('config/application/navigation'); $this->assertHttpMethod('POST'); + $itemType = $this->params->getRequired('type'); + $itemOwner = $this->params->getRequired('owner'); + $navigationConfigForm = new NavigationConfigForm(); $navigationConfigForm->setUser($this->Auth()->getUser()); - $navigationConfigForm->setShareConfig(Config::app('navigation')); + $navigationConfigForm->setShareConfig(Config::fromIni($this->getConfigPath($itemType))); + $navigationConfigForm->setUserConfig(Config::fromIni($this->getConfigPath($itemType, $itemOwner))); $form = new Form(array( 'onSuccess' => function ($form) use ($navigationConfigForm) {