1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor fixes

This commit is contained in:
David Bomba 2023-09-25 21:49:11 +10:00
parent aee7d6a098
commit 1634de96ef
2 changed files with 5 additions and 2 deletions

View File

@ -93,7 +93,7 @@ class ClientGatewayTokenController extends BaseController
*/
public function index(ListClientGatewayTokenRequest $request)
{
$client_gateway_token_gateway_tokens = ClientGatewayToken::scope();
$client_gateway_token_gateway_tokens = ClientGatewayToken::query()->company();
return $this->listResponse($client_gateway_token_gateway_tokens);
}

View File

@ -22,6 +22,9 @@ class ListClientGatewayTokenRequest extends Request
*/
public function authorize() : bool
{
return auth()->user()->isAdmin();
/** @var \App\Models\User $user */
$user = auth()->user();
return $user->isAdmin();
}
}