Skip to content

Commit

Permalink
update write access permission for staff
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsdas committed Jul 27, 2022
1 parent f757cf9 commit 3265182
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion care/facility/models/mixins/permissions/facility.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ def has_object_write_permission(self, request):
or request.user.user_type == User.TYPE_VALUE_MAP["StaffReadOnly"]
):
return False
if request.user.user_type >= User.TYPE_VALUE_MAP["DistrictAdmin"]:
if (
request.user.user_type >= User.TYPE_VALUE_MAP["DistrictAdmin"]
or request.user.user_type == User.TYPE_VALUE_MAP["Staff"]
):
return self.has_object_read_permission(request)
return request.user.home_facility == self

Expand Down

0 comments on commit 3265182

Please sign in to comment.