- Fixed. The missing controls now appear at:
Plans & Platform > Plans, Prices & Entitlements > Groups Available for each tier. Config > Feature Availability > Groups Enabled as the global master switch.
This commit is contained in:
@@ -180,14 +180,16 @@ if ($isLoggedIn && $_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
csrfCheck();
|
||||
$act = $_POST['action'] ?? '';
|
||||
|
||||
if (in_array($act, ['save_platform_services','save_plans','create_plan','run_mysql_mirror'], true)) {
|
||||
if (in_array($act, ['save_group_availability','save_platform_services','save_plans','create_plan','run_mysql_mirror'], true)) {
|
||||
try {
|
||||
$message = handleAdminPlatformAction($act);
|
||||
flash($message ?: 'Platform action completed.');
|
||||
} catch (Throwable $e) {
|
||||
flash($e->getMessage(), 'err');
|
||||
}
|
||||
redirect('tab=platform');
|
||||
$returnTab = $act === 'save_group_availability' && ($_POST['return_tab'] ?? '') === 'config'
|
||||
? 'config' : 'platform';
|
||||
redirect('tab=' . $returnTab);
|
||||
}
|
||||
|
||||
// ── Messages ──────────────────────────────────────────────────────────────
|
||||
@@ -1671,6 +1673,22 @@ td.actions{white-space:nowrap;width:1px}
|
||||
<p>// edit config.json live — changes take effect immediately</p>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-head"><span class="panel-title">// FEATURE AVAILABILITY</span></div>
|
||||
<div class="panel-body">
|
||||
<form method="post">
|
||||
<input type="hidden" name="csrf" value="<?= csrfToken() ?>">
|
||||
<input type="hidden" name="action" value="save_group_availability">
|
||||
<input type="hidden" name="return_tab" value="config">
|
||||
<label class="cb-row">
|
||||
<input type="checkbox" name="groups_enabled" <?= groupsEnabled() ? 'checked' : '' ?>>
|
||||
<span><strong>Groups Enabled</strong> — master switch for private group navigation, channels, and API access.</span>
|
||||
</label>
|
||||
<button type="submit" class="btn btn-g">SAVE GROUP AVAILABILITY</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-head">
|
||||
<span class="panel-title">// config.json</span>
|
||||
@@ -1706,6 +1724,7 @@ td.actions{white-space:nowrap;width:1px}
|
||||
<tr><td class="mono">voice.max_duration_seconds</td><td class="dim">integer</td><td>Maximum voice clip duration</td></tr>
|
||||
<tr><td class="mono">voice.max_upload_bytes</td><td class="dim">integer</td><td>Maximum recording upload size</td></tr>
|
||||
<tr><td class="mono">voice.auto_play_default</td><td class="dim">bool</td><td>Queue and play incoming clips sequentially by default</td></tr>
|
||||
<tr><td class="mono">groups.enabled</td><td class="dim">bool</td><td>Global master switch for private groups</td></tr>
|
||||
<tr><td class="mono">security.min_password_length</td><td class="dim">integer</td><td>Min password chars</td></tr>
|
||||
<tr><td class="mono">security.session_timeout_hours</td><td class="dim">integer</td><td>Session expiry in hours</td></tr>
|
||||
<tr><td class="mono">security.bcrypt_cost</td><td class="dim">integer</td><td>bcrypt work factor (10–14)</td></tr>
|
||||
|
||||
Reference in New Issue
Block a user