new: Add a new api to check the supported PyMISP version

pull/1833/head
iglocska 2017-01-08 20:20:49 +01:00
parent 1da45ba15b
commit 2b187d48fc
3 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,7 @@ class AppController extends Controller {
public $helpers = array('Utility');
private $__jsVersion = '2.4.58';
public $pyMispVersion = '2.4.56';
public $phpmin = '5.5.9';
public $phprec = '5.6.0';

View File

@ -235,6 +235,7 @@ class ACLComponent extends Component {
'edit' => array(),
'fetchServersForSG' => array('*'),
'filterEventIndex' => array(),
'getPyMISPVersion' => array('*'),
'getVersion' => array('*'),
'index' => array('OR' => array('perm_sync', 'perm_admin')),
'previewEvent' => array(),

View File

@ -1155,4 +1155,9 @@ class ServersController extends AppController {
$this->set('response', array('version' => $versionArray['major'] . '.' . $versionArray['minor'] . '.' . $versionArray['hotfix'], 'perm_sync' => $this->userRole['perm_sync']));
$this->set('_serialize', 'response');
}
public function getPyMISPVersion() {
$this->set('response', array('version' => $this->pyMispVersion));
$this->set('_serialize', 'response');
}
}