Merge pull request #7566 from JakubOnderka/getversion-bool

fix: [API] Always return bool for perm fields in getVersion response
pull/7574/head
Jakub Onderka 2021-07-16 10:10:15 +02:00 committed by GitHub
commit f8bcdd1309
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -1800,13 +1800,13 @@ class ServersController extends AppController
$response = [
'version' => $versionArray['major'] . '.' . $versionArray['minor'] . '.' . $versionArray['hotfix'],
'pymisp_recommended_version' => $this->pyMispVersion,
'perm_sync' => $this->userRole['perm_sync'],
'perm_sighting' => $this->userRole['perm_sighting'],
'perm_galaxy_editor' => $this->userRole['perm_galaxy_editor'],
'perm_sync' => (bool) $this->userRole['perm_sync'],
'perm_sighting' => (bool) $this->userRole['perm_sighting'],
'perm_galaxy_editor' => (bool) $this->userRole['perm_galaxy_editor'],
'request_encoding' => $this->CompressedRequestHandler->supportedEncodings(),
'filter_sightings' => true, // check if Sightings::filterSightingUuidsForPush method is supported
];
return $this->RestResponse->viewData($response, $this->response->type());
return $this->RestResponse->viewData($response, 'json');
}
/**