Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Controller/Component/PermissionComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
23 changes: 16 additions & 7 deletions View/Helper/TableListHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,13 @@ public function tableHeader($fieldName, $title = '', $options = array()) {

$end = '</th>';

return $start . $title . $end;
$output = $start . $title . $end;

if (Hash::get($options, 'editUrl', false)) {
$output .= '<th></th>';
}

return $output;
}

/**
Expand Down Expand Up @@ -216,16 +222,19 @@ public function tableData($fieldName, $value = '', $options = array()) {
$value = h($value);
}

$end = '</td>';

$output = $start . $value . $end;

if (Hash::get($options, 'editUrl', false)) {
$value .= $this->LinkButton->edit('',
Hash::get($options, 'editUrl', array()),
array('iconSize' => ' btn-xs')
$output .= '<td>';
$output .= $this->LinkButton->edit(
'', Hash::get($options, 'editUrl', []), ['iconSize' => ' btn-xs']
);
$output .= '</td>';
}

$end = '</td>';

return $start . $value . $end;
return $output;
}

}