diff --git a/Controller/Component/PermissionComponent.php b/Controller/Component/PermissionComponent.php index 82dea241..cf11576e 100644 --- a/Controller/Component/PermissionComponent.php +++ b/Controller/Component/PermissionComponent.php @@ -225,7 +225,9 @@ private function __accessCheck(Controller $controller) { $space = Hash::get($spaces, Hash::get(Current::read('Room'), 'space_id')); $plugin = Inflector::camelize($space['Space']['plugin_key']); $this->SpaceComponent = $controller->Components->load($plugin . '.' . $plugin); - return $this->SpaceComponent->accessCheck($controller); + if (! $this->SpaceComponent->accessCheck($controller)) { + return false; + } } } catch (Exception $ex) { CakeLog::error($ex); diff --git a/View/Helper/TableListHelper.php b/View/Helper/TableListHelper.php index c142428d..2c550006 100644 --- a/View/Helper/TableListHelper.php +++ b/View/Helper/TableListHelper.php @@ -145,7 +145,13 @@ public function tableHeader($fieldName, $title = '', $options = array()) { $end = ''; - return $start . $title . $end; + $output = $start . $title . $end; + + if (Hash::get($options, 'editUrl', false)) { + $output .= ''; + } + + return $output; } /** @@ -216,16 +222,19 @@ public function tableData($fieldName, $value = '', $options = array()) { $value = h($value); } + $end = ''; + + $output = $start . $value . $end; + if (Hash::get($options, 'editUrl', false)) { - $value .= $this->LinkButton->edit('', - Hash::get($options, 'editUrl', array()), - array('iconSize' => ' btn-xs') + $output .= ''; + $output .= $this->LinkButton->edit( + '', Hash::get($options, 'editUrl', []), ['iconSize' => ' btn-xs'] ); + $output .= ''; } - $end = ''; - - return $start . $value . $end; + return $output; } }