From e962b81c4e615deabfc6e0c27abb2f3a3935d14e Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 21 Jul 2026 21:07:16 +0200 Subject: [PATCH] fix(gitlab): reload application secret after save The secret was always stored encrypted, but the setup form wiped the input on every load. Load it back for admins (GitHub App parity) so a reload no longer looks like a failed save. --- app/Livewire/Source/Gitlab/Change.php | 4 +++- .../livewire/source/gitlab/change.blade.php | 8 +++++--- tests/Feature/GitlabSourceChangeViewTest.php | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/app/Livewire/Source/Gitlab/Change.php b/app/Livewire/Source/Gitlab/Change.php index 2e36a1e1f..5a386b429 100644 --- a/app/Livewire/Source/Gitlab/Change.php +++ b/app/Livewire/Source/Gitlab/Change.php @@ -173,7 +173,9 @@ class Change extends Component $this->customUser = $this->gitlab_app->custom_user; $this->customPort = $this->gitlab_app->custom_port; $this->clientId = $this->gitlab_app->client_id; - $this->clientSecretInput = null; + // Decrypt and surface for authorized editors (same pattern as GitHub App client_secret). + $this->gitlab_app->makeVisible(['client_secret', 'webhook_token', 'access_token', 'refresh_token']); + $this->clientSecretInput = $this->gitlab_app->client_secret; $this->webhookToken = $this->gitlab_app->webhook_token; $this->groupName = $this->gitlab_app->group_name; $this->isSystemWide = $this->gitlab_app->is_system_wide; diff --git a/resources/views/livewire/source/gitlab/change.blade.php b/resources/views/livewire/source/gitlab/change.blade.php index caedc88de..5cb859ec5 100644 --- a/resources/views/livewire/source/gitlab/change.blade.php +++ b/resources/views/livewire/source/gitlab/change.blade.php @@ -46,7 +46,8 @@