|
|
|
@ -44,9 +44,10 @@
|
|
|
|
|
(view! uuid req))))
|
|
|
|
|
|
|
|
|
|
(defn assign-users! [req]
|
|
|
|
|
(let [{:keys [uuid assigned]} (form/form-data schema-forms/assign-form req)
|
|
|
|
|
(let [assign-form (schema-forms/assign-form (domain-user/all!))
|
|
|
|
|
{:keys [uuid assigned]} (form/form-data assign-form req)
|
|
|
|
|
permission (get-in req [:params :permission])]
|
|
|
|
|
(if (form/valid? schema-forms/assign-form req)
|
|
|
|
|
(if (form/valid? assign-form req)
|
|
|
|
|
(do
|
|
|
|
|
(domain/assign-users! uuid assigned permission)
|
|
|
|
|
(resp/redirect (path :schema-show (:params req))))
|
|
|
|
|