🤖 Auto commit for release 'develop' on 2025-09-15

This commit is contained in:
JC5
2025-09-15 05:23:47 +02:00
parent 9075fa8ac8
commit de9efb0727
65 changed files with 416 additions and 408 deletions

View File

@@ -50,16 +50,16 @@ class UserGroup extends Model
$userGroupId = (int)$value;
/** @var User $user */
$user = auth()->user();
$user = auth()->user();
/** @var null|UserGroup $userGroup */
$userGroup = self::find($userGroupId);
$userGroup = self::find($userGroupId);
if (null === $userGroup) {
throw new NotFoundHttpException();
}
// need at least ready only to be aware of the user group's existence,
// but owner/full role (in the group) or global owner role may overrule this.
$access = $user->hasRoleInGroupOrOwner($userGroup, UserRoleEnum::READ_ONLY) || $user->hasRole('owner');
$access = $user->hasRoleInGroupOrOwner($userGroup, UserRoleEnum::READ_ONLY) || $user->hasRole('owner');
if ($access) {
return $userGroup;
}