title: Google Spreadsheet Scripting: Disable Other Users Form Adding, Deleting or Moving a Column
body: <p>Bear with me, this is my first time coding or using stackoverflow.  I've been searching through the Google documentation and various search engines looking for an answer and someone told me to try here.</p>
  
  <p>I have a shared spreadsheet in Google driver and I'm trying to write a script that prevents any other user but myself from adding, deleting or updating a column. This is what I have so far:</p>
  
  <pre><code>function onOpen() 
  {
    var ss = SpreadsheetApp.getActive();
  
    var items = 
    [
      {name: 'Show alert', functionName: 'showAlert'},
    ];
  
    ss.addMenu('Custom Menu', items);
  }
  
  function onEdit(e)
  {
     var activeUsersEmail = Session.getActiveUser().getEmail();
  
     //if (e.eventType == 'INSERT_ROW' || 'UPDATE_ROW' || 'DELETE_ROW')
     //{
       showAlert(activeUsersEmail);
     //}
  }
  
  function showAlert(activeUsersEmail) 
  {
    if (activeUsersEmail != 'mypersonalemail@gmail.com')
    {
      var result = Browser.msgBox
      (
        'Permission Denied,
        'Please contact Anne Murphy at mypersonalemail@gmail.com if you wish to update a column.',
        Browser.Buttons.OK
      );
  
      if (result == 'OK') 
      {
        Browser.Close()
      } 
    }
  }
  </code></pre>
  
  <p>I can't seem to check the event type for those three cases... Also, once I know that I can check the event for add, update or move, how do I stop the user from actually doing it?</p>
  
  <p>Any help would be much appreciated. Sorry again for being so lost.</p>