Expand v2 layout, add user administration pages.

This commit is contained in:
James Cole
2024-03-31 16:46:20 +02:00
parent 843f86fc66
commit b6f84c2b99
79 changed files with 3118 additions and 1643 deletions

View File

@@ -98,6 +98,7 @@ class UserGroupRepository implements UserGroupRepositoryInterface
public function get(): Collection
{
$collection = new Collection();
$set = [];
$memberships = $this->user->groupMemberships()->get();
/** @var GroupMembership $membership */
@@ -105,9 +106,14 @@ class UserGroupRepository implements UserGroupRepositoryInterface
/** @var null|UserGroup $group */
$group = $membership->userGroup()->first();
if (null !== $group) {
$collection->push($group);
$groupId = (int)$group->id;
if (in_array($groupId, $set, true)) {
continue;
}
$set[$groupId] = $group;
}
}
$collection->push(...$set);
return $collection;
}