started making graphql do the right thing.

This commit is contained in:
Bryce Covert
2018-08-10 22:36:37 -07:00
parent 8ebd3da0c7
commit cbbabb2219
4 changed files with 28 additions and 10 deletions

View File

@@ -47,7 +47,7 @@
(defn can-see-company? [identity company]
(or (= "admin" (:role identity))
((set (:companies identity)) (:id company))))
((set (map :db/id (:user/companies identity))) (:db/id company))))
(defn assert-can-see-company [identity company]
(when-not (can-see-company? identity company)