mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Add checks for placeholder invitation; Fixed bug in member deletion
This commit is contained in:
committed by
Constantin Graf
parent
b0e638c28b
commit
47aa65d959
@@ -43,7 +43,10 @@ class Controller extends BaseController
|
||||
/** @var Member|null $member */
|
||||
$member = Member::query()->whereBelongsTo($organization, 'organization')->whereBelongsTo($user, 'user')->first();
|
||||
if ($member === null) {
|
||||
Log::error('This function should only be called in authenticated context after checking the user is a member of the organization');
|
||||
Log::error('This function should only be called in authenticated context after checking the user is a member of the organization', [
|
||||
'user' => $user->getKey(),
|
||||
'organization' => $organization->getKey(),
|
||||
]);
|
||||
throw new AuthorizationException;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user