summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2009-11-30 20:31:05 +0100
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2009-11-30 20:31:05 +0100
commit57fcc0f880324fe7861e13a6642166d2e35c1dde (patch)
tree66c2d7614fc215967bfd0288f5f9e440c6e779ba /src
parent5e27541a73256258d99b134f0f5c2e277b48c3b6 (diff)
Do authentication by querying the database for existing users instead of checking a hard-coded user list.
Diffstat (limited to 'src')
-rw-r--r--src/logikorr/servlet.clj8
1 files changed, 3 insertions, 5 deletions
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 "/")))))