mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-05-18 09:21:34 +00:00
Report 'not authorized' for version in health endpoint if user lacks permission
This commit is contained in:
parent
837a7d977b
commit
3b9f8229d4
1 changed files with 2 additions and 0 deletions
|
|
@ -596,6 +596,8 @@ class UpdateManagerController extends AbstractController
|
||||||
|
|
||||||
if ($this->isGranted('@system.show_updates')) {
|
if ($this->isGranted('@system.show_updates')) {
|
||||||
$response['version'] = $this->versionManager->getVersion()->toString();
|
$response['version'] = $this->versionManager->getVersion()->toString();
|
||||||
|
} else {
|
||||||
|
$response['version'] = "not authorized";
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->json($response);
|
return $this->json($response);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue