Adds manager type, blocks certain permissions

This commit is contained in:
Bryce Covert
2020-05-29 07:14:40 -07:00
parent e77e02137c
commit d9bf9867e4
19 changed files with 122 additions and 92 deletions

View File

@@ -321,6 +321,15 @@
(-> context
(assoc-in [:coeffects :user] (get-in context [:coeffects :db :user]))))))
(def with-is-admin?
(re-frame/->interceptor
:id :with-is-admin?
:before (fn [context]
(-> context
(assoc-in [:coeffects :is-admin?] (= "admin"
(:user/role
(get-in context [:coeffects :db :user]))))))))
(defn query-params []
(reduce-kv
(fn [result k v]