mirror of https://github.com/MISP/MISP
chg: [diagnostic] Exposed dbSchemaDiagnostic to the API
parent
7707acdf1a
commit
f03a5c7b5f
|
@ -356,6 +356,7 @@ class ACLComponent extends Component
|
|||
),
|
||||
'servers' => array(
|
||||
'add' => array(),
|
||||
'dbSchemaDiagnostic' => array(),
|
||||
'cache' => array(),
|
||||
'changePriority' => array(),
|
||||
'checkout' => array(),
|
||||
|
|
|
@ -2185,4 +2185,12 @@ misp.direct_call(relative_path, body)
|
|||
$this->Server->resetUpdateFailNumber();
|
||||
$this->redirect(array('action' => 'updateProgress'));
|
||||
}
|
||||
|
||||
public function dbSchemaDiagnostic()
|
||||
{
|
||||
if (!$this->_isSiteAdmin()) {
|
||||
throw new MethodNotAllowedException(__('Only site admin accounts get the DB schema diagnostic.'));
|
||||
}
|
||||
return $this->RestResponse->viewData($this->Server->dbSchemaDiagnostic(), $this->response->type());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue