mutations hebben single
linter / quality (push) Failing after 1m6s
tests / ci (8.3) (push) Failing after 50s
tests / ci (8.4) (push) Failing after 1m6s
tests / ci (8.5) (push) Failing after 1m6s

This commit is contained in:
Daan Meijer
2026-07-06 17:47:14 +02:00
parent 3d6a5362e6
commit 2ab1acf040
4 changed files with 282 additions and 196 deletions
+8 -6
View File
@@ -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.
*/