anchor.diff:          (signal-error future (make-instance 'insufficient-privileges
                                               :msg "Sorry, you are editing a board you don't own.")))))
   
  -(defafun delete-board (future) (user-id board-id)
  +(adefun delete-board (user-id board-id)
     "Delete a board."
  -  (alet ((perms (get-user-board-permissions user-id board-id)))
  -    (if (<= 3 perms)
  -        (alet* ((user-ids (get-affected-users-from-board-ids (list board-id)))
  -                (sock (db-sock))
  -                (query (r:r (:delete (:get (:table "boards") board-id))))
  -                (nil (r:run sock query))
  -                (query (r:r (:delete
  -                              (:get-all (:table "boards_personas_link") board-id :index (db-index "boards_personas_link" "board_id")))))
  -                (nil (r:run sock query))
  -                (nil (delete-keychain-entries user-id board-id))
  -                (sync-ids (add-sync-record user-id "board" board-id "delete" :rel-ids user-ids)))
  -          (r:disconnect sock)
  -          (finish future sync-ids))
  -        (signal-error future (make-instance 'insufficient-privileges
  -                                            :msg "Sorry, you are deleting a board you don't own.")))))
  +  (alet* ((board (and board-id (get-board-by-id board-id)))
  +          (perms (if board
  +                     (get-user-board-permissions user-id nil :board board)
  +                     0)))
  +    (if board
  +        (if (<= 3 perms)
  +            (alet* ((user-ids (get-affected-users-from-board-ids (list board-id)))
  +                    (sock (db-sock))
  +                    (query (r:r (:delete (:get (:table "boards") board-id))))
  +                    (nil (r:run sock query))
  +                    (query (r:r (:delete
  +                                  (:get-all (:table "boards_personas_link") board-id :index (db-index "boards_personas_link" "board_id")))))
  +                    (nil (r:run sock query))
  +                    (nil (delete-keychain-entries user-id board-id))
  +                    (sync-ids (add-sync-record user-id "board" board-id "delete" :rel-ids user-ids)))
  +              (r:disconnect sock)
  +              sync-ids)
  +            (error (make-instance 'insufficient-privileges
  +                                  :msg "Sorry, you are deleting a board you don't own.")))
  +        #())))
   
   (defafun get-board-persona-link (future) (board-id to-persona-id)
     "Given a board id and a persona being shared with, pull out the ID of the
  
positive.code:         (finish future nil)
          (finish future (aref links 0)))))
  
  (defafun get-user-board-permissions (future) (user/persona-id board-id)
    "Returns an integer used to determine a user/persona's permissions for the
     given board.
  
  
negative.code:    1 == read permissions
     2 == update permissions
     3 == owner"
    (alet* ((board (if board
                       board
                       (get-board-by-id board-id :get-privs t))))
      (if (hash-table-p board)
          (let* ((user-id (gethash "user_id" board))
                 (privs (gethash "privs" board))
  