fixing issue with unauthorized.
This commit is contained in:
@@ -47,7 +47,8 @@
|
|||||||
|
|
||||||
(defn can-see-company? [identity company]
|
(defn can-see-company? [identity company]
|
||||||
(or (= "admin" (:role identity))
|
(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]
|
(defn assert-can-see-company [identity company]
|
||||||
(when-not (can-see-company? identity company)
|
(when-not (can-see-company? identity company)
|
||||||
|
|||||||
Reference in New Issue
Block a user