Changeset View
Changeset View
Standalone View
Standalone View
src/app/Http/Controllers/API/V4/GroupsController.php
Show First 20 Lines • Show All 221 Lines • ▼ Show 20 Lines | public static function execProcessStep(Group $group, string $step): ?bool | ||||
} catch (\Exception $e) { | } catch (\Exception $e) { | ||||
\Log::error($e); | \Log::error($e); | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
/** | /** | ||||
* Prepare group statuses for the UI | |||||
* | |||||
* @param \App\Group $group Group object | |||||
* | |||||
* @return array Statuses array | |||||
*/ | |||||
protected static function objectState($group): array | |||||
{ | |||||
return [ | |||||
'isLdapReady' => $group->isLdapReady(), | |||||
'isSuspended' => $group->isSuspended(), | |||||
'isActive' => $group->isActive(), | |||||
'isDeleted' => $group->isDeleted() || $group->trashed(), | |||||
]; | |||||
} | |||||
/** | |||||
* Validate an email address for use as a group email | * Validate an email address for use as a group email | ||||
* | * | ||||
* @param string $email Email address | * @param string $email Email address | ||||
* @param \App\User $user The group owner | * @param \App\User $user The group owner | ||||
* | * | ||||
* @return ?string Error message on validation error | * @return ?string Error message on validation error | ||||
*/ | */ | ||||
public static function validateGroupEmail($email, \App\User $user): ?string | public static function validateGroupEmail($email, \App\User $user): ?string | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |