Skip to content

Commit

Permalink
fix permission mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
george-silva committed Aug 30, 2024
1 parent 725b40e commit f05ac2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/planscape/impacts/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ def has_permission(self, request, view):
tx_plan = get_object_or_404(TreatmentPlan, id=tx_plan_pk)
match view.action:
case "create":
return TreatmentPlanPermission.can_add_scenario(request.user, tx_plan)
return TreatmentPlanPermission.can_change(
request.user,
tx_plan,
)
case "batch_delete":
return TreatmentPlanPermission.can_remove(request.user, tx_plan)
case _:
Expand Down

0 comments on commit f05ac2b

Please sign in to comment.