This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env-proxy (proxy [ApiProxy$Environment] [] | |
(isLoggedIn [] false) | |
(getRequestNamespace [] "") | |
(getDefaultNamespace [] "") | |
(getAttributes [] att) | |
(getAppId [] "_local_")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn side-bar [] | |
(let [ui (users/user-info)] | |
[:div#sidebar | |
[:h3 "Current User"] | |
(if-let [user (:user ui)] | |
[:ul | |
[:li "Logged in as " (.getEmail user)] | |
[:li (link-to (.createLogoutURL (:user-service ui) "/") "Logout")]] | |
[:ul | |
[:li "Not logged in"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defroutes example | |
public-routes | |
(ANY "/admin/*" [] admin-routes) | |
(route/not-found "Page not found")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(wrap! admin-routes | |
wrap-requiring-admin | |
users/wrap-requiring-login | |
users/wrap-with-user-info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn wrap-requiring-admin [application] | |
(fn [request] | |
(let [{:keys [user-service]} (users/user-info request)] | |
(if (.isUserAdmin user-service) | |
(application request) | |
{:status 403 :body "Access denied. You must be logged in as admin user!"})))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defroutes public-routes | |
(GET "/" [] (main-page))) | |
(defroutes admin-routes | |
(GET "/admin/new" [] (render-page "New Post" new-form)) | |
(POST "/admin/post" [title body] (create-post title body))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(local-dev/start-server (var example)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'local-dev) | |
(local-dev/init-app-engine) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvn install:install-file -DgroupId=com.google.appengine \ | |
-DartifactId=appengine-api-labs -Dversion=1.3.4 -Dpackaging=jar \ | |
-Dfile=$GAESDK/lib/user/appengine-api-labs-1.3.4.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/leiningen/classpath.clj b/src/leiningen/classpath.clj | |
index 3be7e1f..836740e 100644 | |
--- a/src/leiningen/classpath.clj | |
+++ b/src/leiningen/classpath.clj | |
@@ -8,7 +8,9 @@ | |
"Returns a seq of Files for all the jars in the project's library directory." | |
[project] | |
(filter #(.endsWith (.getName %) ".jar") | |
- (file-seq (file (:library-path project))))) | |
+ (concat |