From 6e606aa74b18e9fea489411dc5501f036cbe2011 Mon Sep 17 00:00:00 2001 From: arjunrc Date: Sat, 19 Dec 2015 19:04:27 -0500 Subject: [PATCH] removed issue # --- web/api/app/Controller/AppController.php | 1 - web/api/app/Controller/EventsController.php | 7 ------- web/api/app/Controller/MonitorsController.php | 6 ------ web/api/app/Model/User.php | 1 - 4 files changed, 15 deletions(-) diff --git a/web/api/app/Controller/AppController.php b/web/api/app/Controller/AppController.php index d961269d3..5b39597b3 100644 --- a/web/api/app/Controller/AppController.php +++ b/web/api/app/Controller/AppController.php @@ -77,7 +77,6 @@ class AppController extends Controller { throw new UnauthorizedException(__('Not Authenticated')); return; } - // #1155 fixes else { $this->loadModel('User'); diff --git a/web/api/app/Controller/EventsController.php b/web/api/app/Controller/EventsController.php index 28bef7a64..ef569cd7b 100644 --- a/web/api/app/Controller/EventsController.php +++ b/web/api/app/Controller/EventsController.php @@ -14,7 +14,6 @@ class EventsController extends AppController { */ public $components = array('RequestHandler', 'Scaler', 'Image', 'Paginator'); -//#1155 public function beforeFilter() { parent::beforeFilter(); $canView = $this->Session->Read('eventPermission'); @@ -35,7 +34,6 @@ public function beforeFilter() { public function index() { $this->Event->recursive = -1; - // #1155 $allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY); if (!empty($allowedMonitors)) @@ -74,7 +72,6 @@ public function beforeFilter() { 'limit' => '100', 'order' => array('StartTime', 'MaxScore'), 'paramType' => 'querystring', - // #1155 'conditions' => array (array($conditions, $mon_options)) ); $events = $this->Paginator->paginate('Event'); @@ -110,7 +107,6 @@ public function beforeFilter() { throw new NotFoundException(__('Invalid event')); } - // #1155 $allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY); if (!empty($allowedMonitors)) @@ -155,7 +151,6 @@ public function beforeFilter() { */ public function add() { - // - #1155 if ($this->Session->Read('eventPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); @@ -181,7 +176,6 @@ public function beforeFilter() { */ public function edit($id = null) { - // - #1155 if ($this->Session->Read('eventPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); @@ -214,7 +208,6 @@ public function beforeFilter() { * @return void */ public function delete($id = null) { - //- #1155 if ($this->Session->Read('eventPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); diff --git a/web/api/app/Controller/MonitorsController.php b/web/api/app/Controller/MonitorsController.php index 3d493762f..9ab7461f9 100644 --- a/web/api/app/Controller/MonitorsController.php +++ b/web/api/app/Controller/MonitorsController.php @@ -17,7 +17,6 @@ class MonitorsController extends AppController { public $components = array('Paginator', 'RequestHandler'); -//# 1155 public function beforeFilter() { parent::beforeFilter(); $canView = $this->Session->Read('monitorPermission'); @@ -37,7 +36,6 @@ public function beforeFilter() { */ public function index() { $this->Monitor->recursive = 0; - //#1155 $allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY); if (!empty($allowedMonitors)) @@ -67,7 +65,6 @@ public function beforeFilter() { if (!$this->Monitor->exists($id)) { throw new NotFoundException(__('Invalid monitor')); } - //#1155 $allowedMonitors=preg_split ('@,@', $this->Session->Read('allowedMonitors'),NULL, PREG_SPLIT_NO_EMPTY); if (!empty($allowedMonitors)) { @@ -98,7 +95,6 @@ public function beforeFilter() { public function add() { if ($this->request->is('post')) { - //- #1155 if ($this->Session->Read('systemPermission') != 'Edit') { throw new UnauthotizedException(__('Insufficient privileges')); @@ -126,7 +122,6 @@ public function beforeFilter() { if (!$this->Monitor->exists($id)) { throw new NotFoundException(__('Invalid monitor')); } - //- #1155 if ($this->Session->Read('systemPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); @@ -158,7 +153,6 @@ public function beforeFilter() { if (!$this->Monitor->exists()) { throw new NotFoundException(__('Invalid monitor')); } - // #1155 if ($this->Session->Read('systemPermission') != 'Edit') { throw new UnauthorizedException(__('Insufficient privileges')); diff --git a/web/api/app/Model/User.php b/web/api/app/Model/User.php index c0392f51d..8ef18d131 100644 --- a/web/api/app/Model/User.php +++ b/web/api/app/Model/User.php @@ -1,7 +1,6 @@