From e70a72a978eaa9c0edc77e226d0035f8ff682f5e Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Thu, 9 Nov 2017 17:13:07 +0200 Subject: [PATCH] Move user whitelist to config --- src/clj/commiteth/routes/services.clj | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/clj/commiteth/routes/services.clj b/src/clj/commiteth/routes/services.clj index d8d6207..9b72051 100644 --- a/src/clj/commiteth/routes/services.clj +++ b/src/clj/commiteth/routes/services.clj @@ -13,7 +13,6 @@ [commiteth.eth.core :as eth] [commiteth.github.core :as github] [clojure.tools.logging :as log] - [commiteth.eth.core :as eth] [commiteth.config :refer [env]] [commiteth.util.util :refer [usd-decimal->str eth-decimal->str]] @@ -186,28 +185,9 @@ (dissoc :email) (assoc :status-team-member? status-member?))})) -;; NOTE: This assumes username can be trusted and not tampered with -(def user-whitelisted? - #{"oskarth" - "tpatja" - "carlbennetts" - "jarradh" - "anna02test" - "anna03test" - "anna04test" - "anna05test" - "anna06test" - "anna07test" - "anna08test" - "anna09test" - "pablanopete" - "andytudhope" - "ara4n" - "commitethtest" - "noman-land" - "cancuncoconut" - "Chu127001" - "izqui"}) +(defn user-whitelisted? [user] + (let [whitelist (env :user-whitelist #{})] + (whitelist user))) (defapi service-routes (when (:dev env)