fix: [internal] upgrade issues fixed

pull/5526/head
iglocska 2020-01-20 11:56:50 +01:00
parent 379c6c3443
commit 2ac7ea62da
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
2 changed files with 3 additions and 4 deletions

View File

@ -291,7 +291,9 @@ class AppController extends Controller
if ($this->Auth->user()) {
// update script
$this->{$this->modelClass}->runUpdates();
if ($this->_isSiteAdmin() || (Configure::read('MISP.live') && !$this->_isRest())) {
$this->{$this->modelClass}->runUpdates();
}
$user = $this->Auth->user();
if (!isset($user['force_logout']) || $user['force_logout']) {
$this->loadModel('User');

View File

@ -146,9 +146,6 @@ class AppModel extends Model
// this could become useful in the future
public function updateMISP($command)
{
if (!$this->_isSiteAdmin() && (!Configure::read('MISP.live') || $this->_isRest())) {
return false;
}
$dbUpdateSuccess = false;
switch ($command) {
case '2.4.20':