title: permissions preventing UpdateListItems from running properly, using SPServices
body: <p>I've written code to check-in/check-out list items. It works great with administrators, but any other permissions level has trouble, a 401 unauthorized error with UpdateListItems on "_vti_bin/lists.asmx" for the site. I've confirmed that the users can view the "_vti_bin/lists.asmx" web service.</p>
  
  <pre><code>     //declare variables used for check-in/check-out.
    var varName;
    var varChecked;
    var varID
    var varQueryStringVals;
    //Check who has checked out the item
    function getCheckOutPerson (){
  $().SPServices({
      operation: "GetListItems",
      async: false,
      listName: "Communications Services Request Form",
      CAMLQuery: "&lt;Query&gt;&lt;Where&gt;&lt;Eq&gt;&lt;FieldRef Name='ID' /&gt;&lt;Value Type='Number'&gt;" + varID + "&lt;/Value&gt;&lt;/Eq&gt;&lt;/Where&gt;&lt;/Query&gt;",
      completefunc: function (xData, Status) {
        $(xData.responseXML).SPFilterNode("z:row").each(function() {
          varChecked = $(this).attr("ows_CheckedOutTo");
        });
      }
    });
    };
  
  $(document).ready(function() {
  //Check-in if edits cancelled
      $("#cancelBtn").click(function(){
        //Check in edited item.
        if (varName == varChecked){
      $().SPServices({
          operation: "UpdateListItems",
          async: false,
          debug: true,
          listName: "Communications Services Request Form",
          ID: varID,
          valuepairs: [["CheckedOutTo", ""]],
          completefunc: function(xData, Status) {}
      });
      };
      });
   //get current user 
    varName = $().SPServices.SPGetCurrentUser({
      fieldName: "Title",
      debug: false
  });
  //get current list item ID
  varQueryStringVals = $().SPServices.SPGetQueryString();
  varID = varQueryStringVals["ID"];
       //get checked out name
    getCheckOutPerson();
    // item checked in or checked out by current user?
      if (varChecked == undefined || varName == varChecked){
  //check out item
      $().SPServices({
          operation: "UpdateListItems",
          async: false,
          debug: true,
          listName: "Communications Services Request Form",
          ID: varID,
          valuepairs: [["CheckedOutTo", varName]],
          completefunc: function(xData, Status) {
          }
      });
  };
  //checked out message
  if (varChecked != undefined &amp;&amp; varName != varChecked) {
  alert ("You cannot edit this item. It is check out by " + varChecked +".");
  history.back();
  }; 
  //Display 'checked out to' in dispitem.aspx
  getCheckOutPerson();
    if ($('.CheckedOut').text('')) {
      $('.CheckedOut').append(varChecked);
    }
    });
  
   function PreSaveAction() {
   if (varName != varChecked){
  alert ("You cannot make changes to this item. It it checked out to " + varChecked);
  return false;
  };
          //Check in edited item.
      $().SPServices({
          operation: "UpdateListItems",
          async: false,
          debug: true,
          listName: "Communications Services Request Form",
          ID: varID,
          valuepairs: [["CheckedOutTo", ""]],
          completefunc: function(xData, Status) {}
      });
      return true;
   };
  </code></pre>