Define only what is allowed for column restrictions

This commit is contained in:
Frederic Guillot
2016-09-10 23:12:38 -04:00
parent 44f680cf2f
commit a0227cad69
12 changed files with 31 additions and 24 deletions

View File

@@ -16,18 +16,19 @@ class AppController extends Base
* Forbidden page
*
* @access public
* @param bool $withoutLayout
* @param bool $withoutLayout
* @param string $message
*/
public function accessForbidden($withoutLayout = false)
public function accessForbidden($withoutLayout = false, $message = '')
{
if ($this->request->isAjax()) {
$this->response->json(array('message' => 'Access Forbidden'), 403);
$this->response->json(array('message' => $message ?: t('Access Forbidden')), 403);
} else {
$this->response->html($this->helper->layout->app('app/forbidden', array(
'title' => t('Access Forbidden'),
'no_layout' => $withoutLayout,
)));
}
$this->response->html($this->helper->layout->app('app/forbidden', array(
'title' => t('Access Forbidden'),
'no_layout' => $withoutLayout,
)));
}
/**