anchor.diff:                         (nil (r:run sock query)))
                    (finish future keydata))
                  (signal-error future (make-instance 'insufficient-privileges
  -                                                   :msg "Sorry, you are modifying a project you aren't a member of.")))))
  +                                                   :msg "Sorry, you are modifying a project you aren't a member of."))))
            (signal-error future (make-instance 'insufficient-privileges
                                                :msg "Sorry, the persona you are modifying does not exist or you passed the wrong challenge response.")))))
   
  
positive.code: (defafun get-user-projects (future) (user-id get-notes)
    "Get all projects for a user, ordered by sort order."
    (alet* ((sock (db-sock))
            (query (r:r (:order-by
                          (:get-all
                            (:table "projects")
                            user-id
                            :index "user_id")
                          (:asc "sort")
                          (:asc "id"))))
            (cursor (r:run sock query))
            (projects (r:to-array sock cursor)))
      (if (r:cursorp cursor)
  
negative.code:   "Add a persona's key to a project's key data."
    (validate-key (keydata future)
      (aif (persona-challenge-response-valid-p persona-id challenge-response)
           ;; make sure this persona has some for of access to this project
           (alet ((perms (get-user-project-permissions persona-id project-id)))
             (if (<= 1 perms)
                 (alet* ((sock (db-sock))
                         ;; this is a subquery that takes project.keys and updates
                         ;; it according to its existing data: if keys already
                         ;; contains an entry(s) for this persona, they are replaced
                         ;; with the new entry, otherwise the new entry is slapped
                         ;; onto the end of the keys array
                         (sub-query (r:r
                                      ;; if the keys array already contains {a: <persona-id>} ...
                                      (:branch (:contains
  