From 9af468aa3b335587c406e0d6481f77be93eaba4b Mon Sep 17 00:00:00 2001 From: Lukas Staab Date: Sat, 30 Mar 2024 18:09:55 +0100 Subject: [PATCH] FIX: adding termination policy, gave 403 before --- app/Policies/MembershipPolicy.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Policies/MembershipPolicy.php b/app/Policies/MembershipPolicy.php index 432a71e..c7d9d47 100644 --- a/app/Policies/MembershipPolicy.php +++ b/app/Policies/MembershipPolicy.php @@ -18,6 +18,10 @@ public function edit(User $user, RoleMembership $membership, Committee $committe return $user->can('moderator', [$committee, $community]); } + public function terminate(User $user, RoleMembership $membership, Committee $committee, Community $community) : bool { + return $user->can('moderator', [$committee, $community]); + } + public function delete(User $user, RoleMembership $membership, Committee $committee, Community $community) : bool { return $user->can('moderator', [$committee, $community]); }