Skip to content

Commit

Permalink
NavigationController: Require parameter type and owner in action unshare
Browse files Browse the repository at this point in the history
refs #10246
  • Loading branch information
Johannes Meyer committed Sep 29, 2015
1 parent b4bcfa4 commit 8d0e57c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion application/controllers/NavigationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,13 @@ public function unshareAction()
$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) {
Expand Down

0 comments on commit 8d0e57c

Please sign in to comment.