Make managed mode off by default and turned on per side in config.php - $config_enable_managed_instances = true; adds Admin > Managed Instances, the api/managed endpoints and the Managed Instances cron job, and $config_enable_managed_by = true; (or $config_manager_required = true;) adds Admin > Managed By, the Manager Check-in cron job and support sign-in; with a side off its menu entry, pages, modal, post handler and cron job are gone, the manager endpoints answer 503 so instances keep their connection and retry, a connected instance stops checking in and its locks, read-only and suspended lift while its connection is kept, any open support session is ended, and the support user still takes no seat; new managerEnabled(), managedEnabled() and managedConnected(), the cron registry and health check leave out the jobs of a side that is off, changelog updated

This commit is contained in:
johnnyq
2026-11-05 20:17:42 -05:00
parent b5ceeb4eaf
commit 87cdf79b28
14 changed files with 167 additions and 27 deletions

View File

@@ -11,12 +11,18 @@ require_once '../../includes/modal_header.php';
enforceAdminPermission();
$instance = isset($_GET['id']) ? managedInstanceRow(intval($_GET['id'])) : null;
$instance = managerEnabled() && isset($_GET['id']) ? managedInstanceRow(intval($_GET['id'])) : null;
$is_new = $instance === null;
ob_start();
if (!$is_new && !empty($instance['managed_instance_archived_at'])) { ?>
if (!managerEnabled()) { ?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-server me-2"></i>Instance</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body text-center text-secondary py-5">Managing other ITFlow installs is off in this install's config.php.</div>
<?php } elseif (!$is_new && !empty($instance['managed_instance_archived_at'])) { ?>
<div class="modal-header bg-dark">
<h5 class="modal-title"><i class="fas fa-fw fa-server me-2"></i><?= escapeHtml($instance['managed_instance_name']) ?></h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"></button>