You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by bo...@apache.org on 2015/07/16 19:54:30 UTC

[1/4] storm git commit: made change to logviewer.clj in order to remove the invalid 500 http response instead of 404

Repository: storm
Updated Branches:
  refs/heads/master 77f0c8b5b -> 3bc60817d


made change to logviewer.clj in order to remove the invalid 500 http response instead of 404


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/6778b567
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/6778b567
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/6778b567

Branch: refs/heads/master
Commit: 6778b567b56b77a1ac0afe223305865b8684d199
Parents: 9906f85
Author: Sanket <sc...@untilservice-lm>
Authored: Wed Jul 15 09:10:37 2015 -0500
Committer: Sanket <sc...@untilservice-lm>
Committed: Wed Jul 15 09:10:37 2015 -0500

----------------------------------------------------------------------
 .../src/clj/backtype/storm/daemon/logviewer.clj | 26 ++++++++++++--------
 1 file changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/6778b567/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
index e77527b..fabd213 100644
--- a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
@@ -181,12 +181,15 @@
 
 (defn get-log-user-group-whitelist [fname]
   (let [wl-file (get-log-metadata-file fname)
-        m (clojure-from-yaml-file wl-file)
-        user-wl (.get m LOGS-USERS)
-        user-wl (if user-wl user-wl [])
-        group-wl (.get m LOGS-GROUPS)
-        group-wl (if group-wl group-wl [])]
-    [user-wl group-wl]))
+        m (clojure-from-yaml-file wl-file)]
+    (if (not-nil? m)
+      (do
+        (let [user-wl (.get m LOGS-USERS)
+              user-wl (if user-wl user-wl [])
+              group-wl (.get m LOGS-GROUPS)
+              group-wl (if group-wl group-wl [])]
+          [user-wl group-wl]))
+        nil)))
 
 (def igroup-mapper (AuthUtils/GetGroupMappingServiceProviderPlugin *STORM-CONF*))
 (defn user-groups
@@ -194,7 +197,7 @@
   (if (blank? user) [] (.getGroups igroup-mapper user)))
 
 (defn authorized-log-user? [user fname conf]
-  (if (or (blank? user) (blank? fname))
+  (if (or (blank? user) (blank? fname) (nil? (get-log-user-group-whitelist fname)))
     nil
     (let [groups (user-groups user)
           [user-wl group-wl] (get-log-user-group-whitelist fname)
@@ -220,7 +223,7 @@ Note that if anything goes wrong, this will throw an Error and exit."
 (defnk to-btn-link
   "Create a link that is formatted like a button"
   [url text :enabled true]
-  [:a {:href (java.net.URI. url) 
+  [:a {:href (java.net.URI. url)
        :class (str "btn btn-default " (if enabled "enabled" "disabled"))} text])
 
 (defn pager-links [fname start length file-size]
@@ -248,7 +251,7 @@ Note that if anything goes wrong, this will throw an Error and exit."
                            :start (min (max 0 (- file-size length))
                                        (+ start length))
                            :length length})
-                        "Next" :enabled (> next-start start))])]])) 
+                        "Next" :enabled (> next-start start))])]]))
 
 (defn- download-link [fname]
   [[:p (link-to (url-format "/download/%s" fname) "Download Full Log")]])
@@ -285,7 +288,10 @@ Note that if anything goes wrong, this will throw an Error and exit."
                             pager-data)))))
         (-> (resp/response "Page not found")
             (resp/status 404))))
-    (unauthorized-user-html user)))
+    (if (nil? (get-log-user-group-whitelist fname))
+      (-> (resp/response "Page not found")
+        (resp/status 404))
+      (unauthorized-user-html user)))
 
 (defn download-log-file [fname req resp user ^String root-dir]
   (let [file (.getCanonicalFile (File. root-dir fname))]


[2/4] storm git commit: pushed the wrong commit, recorrected it for the build to pass

Posted by bo...@apache.org.
pushed the wrong commit, recorrected it for the build to pass


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e54f6ea5
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e54f6ea5
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e54f6ea5

Branch: refs/heads/master
Commit: e54f6ea58bfd2b2786afe1d0a552935b0ee32adf
Parents: 6778b56
Author: Sanket <sc...@untilservice-lm>
Authored: Wed Jul 15 09:43:01 2015 -0500
Committer: Sanket <sc...@untilservice-lm>
Committed: Wed Jul 15 09:43:01 2015 -0500

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/daemon/logviewer.clj | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/e54f6ea5/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
index fabd213..a981d94 100644
--- a/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
+++ b/storm-core/src/clj/backtype/storm/daemon/logviewer.clj
@@ -291,7 +291,7 @@ Note that if anything goes wrong, this will throw an Error and exit."
     (if (nil? (get-log-user-group-whitelist fname))
       (-> (resp/response "Page not found")
         (resp/status 404))
-      (unauthorized-user-html user)))
+      (unauthorized-user-html user))))
 
 (defn download-log-file [fname req resp user ^String root-dir]
   (let [file (.getCanonicalFile (File. root-dir fname))]


[3/4] storm git commit: Merge branch 'fix_500_error' of https://github.com/redsanket/storm into STORM-793

Posted by bo...@apache.org.
Merge branch 'fix_500_error' of https://github.com/redsanket/storm into STORM-793

STORM-793: Made change to logviewer.clj in order to remove the invalid http 500 response


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/83bd369a
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/83bd369a
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/83bd369a

Branch: refs/heads/master
Commit: 83bd369a7c53073a7ba588ac9c0cfc46136a7cf8
Parents: 77f0c8b e54f6ea
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Thu Jul 16 12:32:18 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Thu Jul 16 12:32:18 2015 -0500

----------------------------------------------------------------------
 .../src/clj/backtype/storm/daemon/logviewer.clj | 26 ++++++++++++--------
 1 file changed, 16 insertions(+), 10 deletions(-)
----------------------------------------------------------------------



[4/4] storm git commit: Added STORM-793 to Changelog

Posted by bo...@apache.org.
Added STORM-793 to Changelog


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/3bc60817
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/3bc60817
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/3bc60817

Branch: refs/heads/master
Commit: 3bc60817dc93064e922e214ac5b22ee59936a268
Parents: 83bd369
Author: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Authored: Thu Jul 16 12:54:04 2015 -0500
Committer: Robert (Bobby) Evans <ev...@yahoo-inc.com>
Committed: Thu Jul 16 12:54:04 2015 -0500

----------------------------------------------------------------------
 CHANGELOG.md | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/3bc60817/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ff5ec5a..39f3ab7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,7 @@
  * STORM-924: Set the file mode of the files included when packaging release packages
  * STORM-799: Use IErrorReport interface more broadly
  * STORM-926: change pom to use maven-shade-plugin:2.2
+ * STORM-793: Made change to logviewer.clj in order to remove the invalid http 500 response
 
 ## 0.10.0-beta2
  * STORM-843: [storm-redis] Add Javadoc to storm-redis