- 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:
Ty Clifford
2026-06-08 16:47:02 -04:00
parent 2881a3b338
commit de8ec43aa4
9 changed files with 107 additions and 42 deletions
+19 -3
View File
@@ -6,11 +6,25 @@ sendCorsHeaders();
$user = authRequired();
$action = $_POST['action'] ?? $_GET['action'] ?? 'list';
if (!groupsEnabled()) {
$planGroupsEnabled = (bool)featureValue($user, 'groups_available', true);
if (!groupsAvailableForUser($user)) {
$error = groupsEnabled()
? 'Private groups are not available on your tier'
: 'Private groups are currently disabled';
if ($action === 'list') {
jsonResponse(['groups' => [], 'member_limit' => 0, 'enabled' => false]);
jsonResponse([
'groups' => [],
'member_limit' => 0,
'enabled' => false,
'platform_enabled' => groupsEnabled(),
'plan_enabled' => $planGroupsEnabled,
]);
}
jsonResponse(['error' => 'Private groups are currently disabled', 'groups_enabled' => false], 403);
jsonResponse([
'error' => $error,
'groups_enabled' => false,
'groups_platform_enabled' => groupsEnabled(),
], 403);
}
switch ($action) {
@@ -19,6 +33,8 @@ switch ($action) {
'groups' => userGroups((int)$user['id']),
'member_limit' => (int)featureValue($user, 'group_member_limit', 2),
'enabled' => true,
'platform_enabled' => true,
'plan_enabled' => true,
]);
case 'create':