Permission issue with delete servers

- fixed a bug that prevented the deletion of sync links
pull/217/head
iglocska 2014-01-24 10:40:46 +01:00
parent 4215066a90
commit fb7f084e70
1 changed files with 1 additions and 1 deletions

View File

@ -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'));