anchor.diff:                                    persona-privs)
                                    (t
                                     0))))
  -          (finish future user-privs))
  -        (finish future 0))))
  +          user-privs)
  +        0)))
   
   (defafun set-board-persona-permissions (future) (user-id board-id from-persona-id to-persona-id permission-value &key invite invite-remote)
     "Gives a persona permissions to view/update a board."
  
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:         (signal-error future (make-instance 'insufficient-privileges
                                              :msg "Sorry, you are editing a board you don't own.")))))
  
  (adefun delete-board (user-id board-id)
    "Delete a board."
    (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
  