mutations hebben single
This commit is contained in:
@@ -8,6 +8,14 @@ use App\Models\User;
|
||||
|
||||
class MutationPolicy
|
||||
{
|
||||
/**
|
||||
* Determine whether the user can view the mutation.
|
||||
*/
|
||||
public function view(User $user, Mutation $mutation): bool
|
||||
{
|
||||
return $user->can('view', $mutation->ledger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can create mutations.
|
||||
*/
|
||||
@@ -18,12 +26,6 @@ class MutationPolicy
|
||||
return $dynamic->participants()->where('user_id', $user->id)->exists();
|
||||
}
|
||||
|
||||
public function view(User $user, Mutation $mutation): bool
|
||||
{
|
||||
$ledger = $mutation->ledger;
|
||||
return $user->can('view', $ledger);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the mutation.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user