Adds manager type, blocks certain permissions
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user