add sessionClose to search and get actions in the Tor controllers

This commit is contained in:
Fabian Franz
2018-02-04 10:05:20 +01:00
parent 9ec4f5baa5
commit 4663727b47
5 changed files with 10 additions and 0 deletions
@@ -39,10 +39,12 @@ class ExitaclController extends ApiMutableModelControllerBase
static protected $internalModelClass = '\OPNsense\Tor\ACLExitPolicy';
public function searchaclAction()
{
$this->sessionClose();
return $this->searchBase('policy', array('enabled', 'type', 'network', 'action', 'startport', 'endport'));
}
public function getaclAction($uuid = null)
{
$this->sessionClose();
return $this->getBase('exitpolicy', 'policy', $uuid);
}
public function addaclAction()
@@ -77,11 +77,13 @@ class GeneralController extends ApiMutableModelControllerBase
public function searchhidservauthAction()
{
$this->sessionClose();
return $this->searchBase('client_authentications.client_auth', array('enabled', 'onion_service', 'auth_cookie'));
}
public function gethidservauthAction($uuid = null)
{
$this->sessionClose();
return $this->getBase('client_auth', 'client_authentications.client_auth', $uuid);
}
@@ -36,10 +36,12 @@ class HiddenserviceController extends ApiMutableModelControllerBase
static protected $internalModelClass = '\OPNsense\Tor\HiddenService';
public function searchserviceAction()
{
$this->sessionClose();
return $this->searchBase('service', array('enabled', 'name'));
}
public function getserviceAction($uuid = null)
{
$this->sessionClose();
return $this->getBase('hiddenservice', 'service', $uuid);
}
public function addserviceAction()
@@ -36,10 +36,12 @@ class HiddenserviceaclController extends ApiMutableModelControllerBase
static protected $internalModelClass = '\OPNsense\Tor\HiddenServiceACL';
public function searchaclAction()
{
$this->sessionClose();
return $this->searchBase('hiddenserviceacl', array('enabled', 'hiddenservice', 'port', 'target_host', 'target_port'));
}
public function getaclAction($uuid = null)
{
$this->sessionClose();
return $this->getBase('hiddenserviceacl', 'hiddenserviceacl', $uuid);
}
public function addaclAction()
@@ -36,10 +36,12 @@ class SocksaclController extends ApiMutableModelControllerBase
static protected $internalModelClass = '\OPNsense\Tor\ACLSocksPolicy';
public function searchaclAction()
{
$this->sessionClose();
return $this->searchBase('policy', array('enabled', 'type', 'network', 'action'));
}
public function getaclAction($uuid = null)
{
$this->sessionClose();
return $this->getBase('policy', 'policy', $uuid);
}
public function addaclAction()