|
|
@ -72,19 +72,7 @@
|
|
|
|
(resp/redirect (path :schema-show (:params req)))
|
|
|
|
(resp/redirect (path :schema-show (:params req)))
|
|
|
|
:flash ["No write permission for schema"])))))
|
|
|
|
:flash ["No write permission for schema"])))))
|
|
|
|
|
|
|
|
|
|
|
|
(defroutes routes
|
|
|
|
(defroutes write-routes
|
|
|
|
(GET "/403" [] {:status 403 :body "NE"})
|
|
|
|
|
|
|
|
(GET (register! :schema-overview "/schema")
|
|
|
|
|
|
|
|
[]
|
|
|
|
|
|
|
|
view-schema/overview!)
|
|
|
|
|
|
|
|
(GET (register! :schema-show "/schema/:uuid")
|
|
|
|
|
|
|
|
[uuid :as req]
|
|
|
|
|
|
|
|
(view! uuid req))
|
|
|
|
|
|
|
|
(POST (register! :schema-new "/schema/new")
|
|
|
|
|
|
|
|
[]
|
|
|
|
|
|
|
|
new!)
|
|
|
|
|
|
|
|
(wrap-allowed-to-write
|
|
|
|
|
|
|
|
(comp/routes
|
|
|
|
|
|
|
|
(POST (register! :schema-edit "/schema/edit") []
|
|
|
|
(POST (register! :schema-edit "/schema/edit") []
|
|
|
|
edit!)
|
|
|
|
edit!)
|
|
|
|
(POST (register! :schema-assign-users "/schema/assign/users") []
|
|
|
|
(POST (register! :schema-assign-users "/schema/assign/users") []
|
|
|
@ -93,4 +81,15 @@
|
|
|
|
assign-schemas!)
|
|
|
|
assign-schemas!)
|
|
|
|
(DELETE (register! :schema-delete "/schema/:uuid")
|
|
|
|
(DELETE (register! :schema-delete "/schema/:uuid")
|
|
|
|
[uuid :as req]
|
|
|
|
[uuid :as req]
|
|
|
|
(delete-schema! uuid (:session req))))))
|
|
|
|
(delete-schema! uuid (:session req))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(defroutes routes
|
|
|
|
|
|
|
|
(GET (register! :schema-overview "/schema") []
|
|
|
|
|
|
|
|
view-schema/overview!)
|
|
|
|
|
|
|
|
(GET (register! :schema-show "/schema/:uuid")
|
|
|
|
|
|
|
|
[uuid :as req]
|
|
|
|
|
|
|
|
(view! uuid req))
|
|
|
|
|
|
|
|
(POST (register! :schema-new "/schema/new") []
|
|
|
|
|
|
|
|
new!)
|
|
|
|
|
|
|
|
(comp/wrap-routes write-routes
|
|
|
|
|
|
|
|
wrap-allowed-to-write))
|
|
|
|