                          (not-found)))}
 
       :post {:summary "Upload the DTBook XML structure for a production"
-             :middleware [wrap-restricted]
-             :swagger {:security [{:apiAuth []}]}
+             :middleware [wrap-restricted wrap-authorized]
+             :swagger {:security [{:apiAuth []}]}
+             :authorized #{:etext :it}
              :parameters {:path {:id int?}
                           :multipart {:file multipart/temp-file-part}}
              :handler (fn [{{{:keys [file]} :multipart {:keys [id]} :path} :parameters}]

    [reitit.ring.middleware.muuntaja :as muuntaja]
    [reitit.ring.middleware.multipart :as multipart]
    [reitit.ring.middleware.parameters :as parameters]
    [mdr2.middleware :refer [wrap-restricted]]
    [mdr2.middleware.formats :as formats]
    [ring.util.http-response :refer :all]
    [clojure.string :refer [blank?]]


      :delete {:summary "Delete a production"
               :description "Mark a production as deleted"
               :middleware [wrap-restricted wrap-authorized]
               :swagger {:security [{:apiAuth []}]}
               :authorized #{:it}
               :parameters {:path {:id int?}}
               :handler (fn [{{{:keys [id]} :path} :parameters}]
                          (if-let [p (prod/get-production id)]
