From bdcc0c8de567219bdcb7a8cb8a86c8836227066e Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 29 Sep 2023 11:01:58 +0200 Subject: [PATCH] fix: only show manually added private keys on server view --- routes/web.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/web.php b/routes/web.php index ada529100..34adf01b2 100644 --- a/routes/web.php +++ b/routes/web.php @@ -99,7 +99,7 @@ ]))->name('server.proxy'); Route::get('/server/{server_uuid}/private-key', fn () => view('server.private-key', [ 'server' => Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->firstOrFail(), - 'privateKeys' => PrivateKey::ownedByCurrentTeam()->get(), + 'privateKeys' => PrivateKey::ownedByCurrentTeam()->get()->where('is_git_related', false), ]))->name('server.private-key'); Route::get('/server/{server_uuid}/destinations', fn () => view('server.destinations', [ 'server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail() @@ -133,7 +133,7 @@ Route::middleware(['auth'])->group(function () { Route::get('/security', fn () => view('security.index'))->name('security.index'); Route::get('/security/private-key', fn () => view('security.private-key.index', [ - 'privateKeys' => PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related'])->where('is_git_related', false)->get() + 'privateKeys' => PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related'])->get() ]))->name('security.private-key.index'); Route::get('/security/private-key/new', fn () => view('security.private-key.new'))->name('security.private-key.new'); Route::get('/security/private-key/{private_key_uuid}', fn () => view('security.private-key.show', [