Noxus-logo + API-tabi piiloon ilman integraatioita
- Luotu Noxus SVG-logo (violetti heksagoni + N) - Demo-yritys nimetty uudelleen Noxukseksi violetilla värillä - API-tabi piilotettuna ellei yrityksellä ole integraatioita päällä (superadmin näkee aina) - check_auth palauttaa has_integrations-lipun Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
9
api.php
9
api.php
@@ -1612,6 +1612,14 @@ switch ($action) {
|
||||
if (!$branding) {
|
||||
$branding = ['found' => false, 'nimi' => 'Noxus Intra', 'primary_color' => '#0f3460', 'subtitle' => 'Hallintapaneeli', 'logo_url' => ''];
|
||||
}
|
||||
// Tarkista onko yrityksellä integraatioita päällä
|
||||
$hasIntegrations = false;
|
||||
if ($activeCompanyId) {
|
||||
$integrations = dbLoadIntegrations($activeCompanyId);
|
||||
foreach ($integrations as $integ) {
|
||||
if (!empty($integ['enabled'])) { $hasIntegrations = true; break; }
|
||||
}
|
||||
}
|
||||
echo json_encode([
|
||||
'authenticated' => true,
|
||||
'user_id' => $_SESSION['user_id'],
|
||||
@@ -1626,6 +1634,7 @@ switch ($action) {
|
||||
'branding' => $branding,
|
||||
'enabled_modules' => $enabledModules,
|
||||
'hidden_mailboxes' => $u ? ($u['hidden_mailboxes'] ?? []) : [],
|
||||
'has_integrations' => $hasIntegrations,
|
||||
]);
|
||||
} else {
|
||||
echo json_encode(['authenticated' => false]);
|
||||
|
||||
Reference in New Issue
Block a user