Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/UsersController.php
Show All 31 Lines | class UsersController extends Controller | ||||
* On user create it is filled with a user or group object to force-delete | * On user create it is filled with a user or group object to force-delete | ||||
* before the creation of a new user record is possible. | * before the creation of a new user record is possible. | ||||
* | * | ||||
* @var \App\User|\App\Group|null | * @var \App\User|\App\Group|null | ||||
*/ | */ | ||||
protected $deleteBeforeCreate; | protected $deleteBeforeCreate; | ||||
/** @var array Common object properties in the API response */ | /** @var array Common object properties in the API response */ | ||||
protected static $objectProps = ['email', 'status']; | protected static $objectProps = ['email']; | ||||
/** | /** | ||||
* Delete a user. | * Delete a user. | ||||
* | * | ||||
* @param int $id User identifier | * @param int $id User identifier | ||||
* | * | ||||
* @return \Illuminate\Http\JsonResponse The response | * @return \Illuminate\Http\JsonResponse The response | ||||
▲ Show 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | public static function statusInfo(User $user): array | ||||
->all(); | ->all(); | ||||
$result = [ | $result = [ | ||||
'skus' => $skus, | 'skus' => $skus, | ||||
// 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, | ||||
// TODO: Make 'enableDistlists' working for wallet controllers that aren't account owners | // TODO: Make 'enableDistlists' working for wallet controllers that aren't account owners | ||||
'enableDistlists' => $isController && $hasCustomDomain && in_array('distlist', $skus), | 'enableDistlists' => $isController && $hasCustomDomain && in_array('distlist', $skus), | ||||
// TODO: Make 'enableResources' working for wallet controllers that aren't account owners | |||||
'enableResources' => $isController && $hasCustomDomain && in_array('beta-resources', $skus), | |||||
'enableUsers' => $isController, | 'enableUsers' => $isController, | ||||
'enableWallets' => $isController, | 'enableWallets' => $isController, | ||||
]; | ]; | ||||
return array_merge($process, $result); | return array_merge($process, $result); | ||||
} | } | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 541 Lines • Show Last 20 Lines |