def METHOD_NAME(request, path):
    obj = parse_path(request, path, (Project, Component, Translation))
    if not request.user.has_perm("vcs.reset", obj):
        raise PermissionDenied
    return execute_locked(
        request,
        obj,
        gettext("All repositories have been reset."),
        obj.do_reset,
        request,
    )