                               (map prod/remove-null-values)
                               ok)))}
       :post {:summary "Create a production"
-             :middleware [wrap-restricted]
-             :swagger {:security [{:apiAuth []}]}
+             :middleware [wrap-restricted wrap-authorized]
+             :swagger {:security [{:apiAuth []}]}
+             :authorized #{:it}
              :parameters {:body prod.spec/production}
              :handler (fn [{{p :body} :parameters}]
                         (try


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

                            (not-found)))}

      :patch {:summary "Patch a production, e.g. update the library_signature"
              :middleware [wrap-restricted wrap-authorized]
              :swagger {:security [{:apiAuth []}]}
              :authorized #{:catalog :it}
              :parameters {:path {:id int?}
                           :body {:library_signature ::prod.spec/library_signature}}
              :handler (fn [{{{:keys [id]} :path {:keys [library_signature]} :body} :parameters}]
