removed issue #
parent
38b4785557
commit
6e606aa74b
|
@ -77,7 +77,6 @@ class AppController extends Controller {
|
|||
throw new UnauthorizedException(__('Not Authenticated'));
|
||||
return;
|
||||
}
|
||||
// #1155 fixes
|
||||
else
|
||||
{
|
||||
$this->loadModel('User');
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -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'));
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
App::uses('AppModel', 'Model');
|
||||
|
||||
// #1155
|
||||
/**
|
||||
* User Model
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue