Hide startup line from API response if user doesn't have startup permissions

This commit is contained in:
Dane Everitt 2020-08-22 19:01:42 -07:00
parent 9ae3c17913
commit 813a671571
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 4 additions and 3 deletions

View file

@ -61,7 +61,7 @@ class ServerTransformer extends BaseClientTransformer
'io' => $server->io,
'cpu' => $server->cpu,
],
'invocation' => $service->handle($server),
'invocation' => $service->handle($server, ! $this->getUser()->can(Permission::ACTION_STARTUP_READ, $server)),
'feature_limits' => [
'databases' => $server->database_limit,
'allocations' => $server->allocation_limit,