juiste view policy voor een mutation
This commit is contained in:
parent
1be49133a0
commit
dc94c2252c
@ -18,6 +18,12 @@ class MutationPolicy
|
|||||||
return $dynamic->participants()->where('user_id', $user->id)->exists();
|
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.
|
* Determine whether the user can update the mutation.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user