diff --git a/integrations.php b/integrations.php index 70825e0..1d12d6e 100644 --- a/integrations.php +++ b/integrations.php @@ -55,8 +55,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $existing = $stmtExisting->fetch(); $existingSettings = json_decode($existing['settings'] ?? '{}', true) ?: []; - // Als geheim veld leeg is gelaten, behoud het bestaande geheim - if (empty($clientSecret) && !empty($existingSettings['client_secret'])) { + // Als geheim veld leeg is gelaten of bullet tekens bevat, behoud het bestaande geheim + if (($clientSecret === '' || $clientSecret === '••••••••••••••••') && !empty($existingSettings['client_secret']) && $existingSettings['client_secret'] !== '••••••••••••••••') { $clientSecret = $existingSettings['client_secret']; } @@ -119,7 +119,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $existing = $stmtExisting->fetch(); $existingSettings = json_decode($existing['settings'] ?? '{}', true) ?: []; - if (empty($jiraToken) && !empty($existingSettings['jira_api_token'])) { + if (($jiraToken === '' || $jiraToken === '••••••••••••••••') && !empty($existingSettings['jira_api_token']) && $existingSettings['jira_api_token'] !== '••••••••••••••••') { $jiraToken = $existingSettings['jira_api_token']; } @@ -310,6 +310,20 @@ $redirectUri = rtrim(APP_URL, '/') . '/auth/callback_microsoft.php';
4. Maak een geheim aan onder Certificaten en geheimen.
5. Voeg API-machtigingen toe: Calendars.Read, User.Read, offline_access.
6. Cruciaal voor organisaties: Klik direct boven de tabel met machtigingen op de knop "Beheerdersgoedkeuring verlenen voor [Organisatie]" (Grant admin consent) en bevestig met 'Ja'. Hiermee voorkomt u de melding "Beheerdersgoedkeuring vereist".
+ + + @@ -341,11 +355,11 @@ $redirectUri = rtrim(APP_URL, '/') . '/auth/callback_microsoft.php'; type="password" id="msClientSecret" name="client_secret" - value="= !empty($outlookSettings['client_secret']) ? '••••••••••••••••' : htmlspecialchars(fociz_env('MICROSOFT_CLIENT_SECRET', '')) ?>" + value="= htmlspecialchars(!empty($outlookSettings['client_secret']) && $outlookSettings['client_secret'] !== '••••••••••••••••' ? $outlookSettings['client_secret'] : fociz_env('MICROSOFT_CLIENT_SECRET', '')) ?>" placeholder="Plak hier de Waarde (Value) van uw Client Secret" class="w-full bg-slate-950 border border-slate-800 rounded-lg px-2.5 py-1.5 pr-8 text-xs text-white placeholder-slate-600 focus:outline-none focus:border-blue-500 font-mono" > -