From fb7f084e70de6a23f7e0d410c74847f938f1b9a7 Mon Sep 17 00:00:00 2001 From: iglocska Date: Fri, 24 Jan 2014 10:40:46 +0100 Subject: [PATCH] Permission issue with delete servers - fixed a bug that prevented the deletion of sync links --- app/Controller/ServersController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controller/ServersController.php b/app/Controller/ServersController.php index 5f44099d0..be5dc6d01 100755 --- a/app/Controller/ServersController.php +++ b/app/Controller/ServersController.php @@ -135,7 +135,7 @@ class ServersController extends AppController { throw new NotFoundException(__('Invalid server')); } $s = $this->Server->read(null, $id); - if (!$this->_isSiteAdmin() || !($s['Server']['org'] == $this->Auth->user('org') && $this->_isSiteAdmin())) $this->redirect(array('controller' => 'servers', 'action' => 'index')); + if (!$this->_isSiteAdmin() && !($s['Server']['org'] == $this->Auth->user('org') && $this->_isSiteAdmin())) $this->redirect(array('controller' => 'servers', 'action' => 'index')); if ($this->Server->delete()) { $this->Session->setFlash(__('Server deleted')); $this->redirect(array('action' => 'index'));