From 52cbddcbde89746ebc5485babf0a9a7d49350450 Mon Sep 17 00:00:00 2001 From: Bryce Covert Date: Tue, 18 Sep 2018 07:21:53 -0700 Subject: [PATCH] fixing issue with unauthorized. --- src/clj/auto_ap/graphql/utils.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clj/auto_ap/graphql/utils.clj b/src/clj/auto_ap/graphql/utils.clj index ea0e95a4..6efc440d 100644 --- a/src/clj/auto_ap/graphql/utils.clj +++ b/src/clj/auto_ap/graphql/utils.clj @@ -47,7 +47,8 @@ (defn can-see-company? [identity company] (or (= "admin" (:role identity)) - ((set (:companies identity)) (:id company)))) + ((set (:companies identity)) (:id company)) + ((set (:companies identity)) company))) (defn assert-can-see-company [identity company] (when-not (can-see-company? identity company)