From 57fcc0f880324fe7861e13a6642166d2e35c1dde Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 30 Nov 2009 20:31:05 +0100 Subject: Do authentication by querying the database for existing users instead of checking a hard-coded user list. --- src/logikorr/servlet.clj | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/logikorr/servlet.clj b/src/logikorr/servlet.clj index 5ade9a8..79ff1e0 100644 --- a/src/logikorr/servlet.clj +++ b/src/logikorr/servlet.clj @@ -151,11 +151,9 @@ (let [users (UserServiceFactory/getUserService) user (.getCurrentUser users)] (if (and user - (some #(= (.getEmail user) %) - #{"mulkiatsch@gmail.com" - "gpmfuchs@gmx.de" - "kilian@fachschaften.uni-muenchen.de" - "schwicht@mathematik.uni-muenchen.de"})) + (not (empty? (ds/find-all + (doto (Query. "user") + (.addFilter "email" Query$FilterOperator/EQUAL (.getEmail user))))))) (thunk) (redirect-to (.createLoginURL users "/"))))) -- cgit v1.2.3