   :patch! (fn [ctx] (update-org conn ctx slug))
 
   ;; Responses
-  :handle-ok (fn [ctx] (let [user (user-from-context ctx)
+  :handle-ok (fn [ctx] (let [user (:user ctx)
                              user-id (:user-id user)
                              org (or (:updated-org ctx) (:existing-org ctx))
                              org-id (:uuid org)

  ;; Authorization
  :allowed? (by-method {
    :options true
    :get (fn [ctx] (let [user (user-from-context ctx)]
                     (access/access-level-for conn slug user)))
    :patch (fn [ctx] (access/allow-authors conn slug (:user ctx)))})

  ;; Validations


;; A resource for operations on a particular Org
(defresource org [conn slug]
  (api-common/open-company-anonymous-resource config/passphrase) ; verify validity of optional JWToken

  :allowed-methods [:options :get :patch]

