NavigationController: Require parameter type and owner in action unshare

refs #10246
This commit is contained in:
Johannes Meyer 2015-09-29 17:13:45 +02:00
parent b4bcfa4e08
commit 8d0e57c95e
1 changed files with 5 additions and 1 deletions

View File

@ -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) {