Skip to content

Commit 0f8b3d1

Browse files
allow team member deletions
1 parent 69c0ae9 commit 0f8b3d1

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/admin_dashboard_portal/app/policies/admin_dashboard_portal/hackathon/team_membership_policy.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ class AdminDashboardPortal::Hackathon::TeamMembershipPolicy < ::Hackathon::TeamM
44
def create?
55
false
66
end
7+
8+
def destroy?
9+
# Allow destroying team memberships, but not the team owner's membership
10+
record.team.hacker_id != record.hacker_id
11+
end
712
end

0 commit comments

Comments
 (0)