Remove methods, point to interface.

This commit is contained in:
James Cole
2025-02-23 12:27:07 +01:00
parent b93cfc5de2
commit 8d464962a8
30 changed files with 53 additions and 136 deletions

View File

@@ -40,11 +40,16 @@ trait UserGroupTrait
protected ?User $user = null;
protected ?UserGroup $userGroup = null;
public function getUserGroup(): UserGroup
public function getUserGroup(): ?UserGroup
{
return $this->userGroup;
}
public function getUser(): ?User
{
return $this->user;
}
public function checkUserGroupAccess(UserRoleEnum $role): bool
{
$result = $this->user->hasRoleInGroupOrOwner($this->userGroup, $role);