diff --git a/care/users/api/viewsets/users.py b/care/users/api/viewsets/users.py index 9d590b546d..ff0a325c61 100644 --- a/care/users/api/viewsets/users.py +++ b/care/users/api/viewsets/users.py @@ -151,6 +151,12 @@ def destroy(self, request, *args, **kwargs): user_type__lt=User.TYPE_VALUE_MAP["StateAdmin"], is_superuser=False, ) + elif request.user.user_type == User.TYPE_VALUE_MAP["DistrictAdmin"]: + queryset = queryset.filter( + district=request.user.district, + user_type__lt=User.TYPE_VALUE_MAP["DistrictAdmin"], + is_superuser=False, + ) else: return Response( status=status.HTTP_403_FORBIDDEN, data={"permission": "Denied"}