summaryrefslogtreecommitdiff
path: root/app/Controller/AppController.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-09-10 23:12:38 -0400
committerFrederic Guillot <fred@kanboard.net>2016-09-10 23:12:38 -0400
commita0227cad69aff9486fba1d7b2a19e6da97450100 (patch)
treee4585be087759022b8a3d0108eacff3494da470e /app/Controller/AppController.php
parent44f680cf2f1463721eb5bdb7eda4d3b339e63ba9 (diff)
Define only what is allowed for column restrictions
Diffstat (limited to 'app/Controller/AppController.php')
-rw-r--r--app/Controller/AppController.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/Controller/AppController.php b/app/Controller/AppController.php
index 45cf39a5..34b9c8cc 100644
--- a/app/Controller/AppController.php
+++ b/app/Controller/AppController.php
@@ -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,
- )));
}
/**