Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/UsersController.php
Show First 20 Lines • Show All 187 Lines • ▼ Show 20 Lines | public static function statusInfo($user): array | ||||
$plan = $isController ? $user->wallet()->plan() : null; | $plan = $isController ? $user->wallet()->plan() : null; | ||||
$result = [ | $result = [ | ||||
'skus' => $skus, | 'skus' => $skus, | ||||
'enableBeta' => $hasBeta, | 'enableBeta' => $hasBeta, | ||||
// TODO: This will change when we enable all users to create domains | // TODO: This will change when we enable all users to create domains | ||||
'enableDomains' => $isController && $hasCustomDomain, | 'enableDomains' => $isController && $hasCustomDomain, | ||||
'enableDistlists' => $isController && $hasCustomDomain, | 'enableDistlists' => $isController && $hasCustomDomain && \config('app.with_distlists'), | ||||
'enableFiles' => !$isDegraded && $hasBeta && \config('app.with_files'), | 'enableFiles' => !$isDegraded && $hasBeta && \config('app.with_files'), | ||||
'enableFolders' => $isController && $hasCustomDomain, | 'enableFolders' => $isController && $hasCustomDomain && \config('app.with_shared_folders'), | ||||
'enableResources' => $isController && $hasCustomDomain && $hasBeta, | 'enableResources' => $isController && $hasCustomDomain && $hasBeta && \config('app.with_resources'), | ||||
'enableRooms' => $hasMeet, | 'enableRooms' => $hasMeet && \config('app.with_meet'), | ||||
'enableSettings' => $isController, | 'enableSettings' => $isController, | ||||
'enableSubscriptions' => $isController && \config('app.with_subscriptions'), | 'enableSubscriptions' => $isController && \config('app.with_subscriptions'), | ||||
'enableUsers' => $isController, | 'enableUsers' => $isController, | ||||
'enableWallets' => $isController && \config('app.with_wallet'), | 'enableWallets' => $isController && \config('app.with_wallet'), | ||||
'enableWalletMandates' => $isController, | 'enableWalletMandates' => $isController, | ||||
'enableWalletPayments' => $isController && (!$plan || $plan->mode != Plan::MODE_MANDATE), | 'enableWalletPayments' => $isController && (!$plan || $plan->mode != Plan::MODE_MANDATE), | ||||
'enableCompanionapps' => $hasBeta, | 'enableCompanionapps' => $hasBeta && \config('app.with_companion_app'), | ||||
]; | ]; | ||||
return array_merge($process, $result); | return array_merge($process, $result); | ||||
} | } | ||||
/** | /** | ||||
* Create a new user record. | * Create a new user record. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 492 Lines • Show Last 20 Lines |