From 4a262e09f56f07a009a2d6ad0d360b818ff68ebf Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 29 Nov 2009 11:43:47 +0100 Subject: Require authentication. --- src/logikorr/servlet.clj | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/logikorr/servlet.clj b/src/logikorr/servlet.clj index 76d7897..6eef643 100644 --- a/src/logikorr/servlet.clj +++ b/src/logikorr/servlet.clj @@ -142,6 +142,19 @@ (str (:number new))))) (defroutes logikorr + (GET "/*" (let [users (UserServiceFactory/getUserService) + user (.getCurrentUser users)] + (if (and user + (some #(= user %) #{"mulkiatsch@gmail.com" + "gpmfuchs@gmx.de" + "kilian@fachschaften.uni-muenchen.de" + "schwicht@mathematik.uni-muenchen.de"})) + :next + (html [:html + [:head [:title "Access denied."]] + [:body + [:h1 "Access denied."] + [:p "You do not have access to this application."]]])))) (GET "/" index) (GET "/favicon.ico" (do nil)) (GET "/logikorr-completion-data.js" (compute-completion-data-js)) -- cgit v1.2.3