Repository: incubator-nifi
Updated Branches:
  refs/heads/NIFI-353 61fc04674 -> b43fe6f93


NIFI-353:
- Clean up.
- Fixing authority check for DFM with check for Provenance.

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

Branch: refs/heads/NIFI-353
Commit: b43fe6f935ce5697f551e5a3b30f7703b49f64a7
Parents: 61fc046
Author: Matt Gilman <[email protected]>
Authored: Sun Mar 22 00:30:34 2015 -0400
Committer: Matt Gilman <[email protected]>
Committed: Sun Mar 22 00:30:34 2015 -0400

----------------------------------------------------------------------
 .../org/apache/nifi/web/server/DataHandler.java | 55 --------------------
 .../nifi/web/StandardNiFiContentAccess.java     |  2 +-
 .../nifi/web/ContentViewerController.java       |  2 -
 3 files changed, 1 insertion(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b43fe6f9/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/DataHandler.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/DataHandler.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/DataHandler.java
deleted file mode 100644
index 1e9e4e0..0000000
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/DataHandler.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.nifi.web.server;
-
-import java.io.IOException;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.eclipse.jetty.webapp.WebAppContext;
-
-/**
- *
- */
-public class DataHandler extends HttpServlet {
-
-    private final WebAppContext dataApps;
-
-    public DataHandler(WebAppContext dataApps) {
-        this.dataApps = dataApps;
-    }
-    
-    @Override
-    protected void doGet(final HttpServletRequest request, final 
HttpServletResponse response) throws ServletException, IOException {
-        // detect file type and appropriate data app to forward to
-        
-        // header
-        final RequestDispatcher header = 
request.getRequestDispatcher("/WEB-INF/jsp/header.jsp");
-        header.include(request, response);
-        
-        // content
-        final RequestDispatcher content = 
dataApps.getServletContext().getRequestDispatcher("/WEB-INF/jsp/content.jsp");
-        content.include(request, response);
-        
-        // footer
-        final RequestDispatcher footer = 
request.getRequestDispatcher("/WEB-INF/jsp/footer.jsp");
-        footer.include(request, response);
-    }
-    
-}

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b43fe6f9/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
index b44a097..70aad94 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/StandardNiFiContentAccess.java
@@ -56,7 +56,7 @@ public class StandardNiFiContentAccess implements 
ContentAccess {
     private WebClusterManager clusterManager;
     
     @Override
-    @PreAuthorize("hasRole('ROLE_DFM')")
+    @PreAuthorize("hasRole('ROLE_PROVENANCE')")
     public DownloadableContent getContent(final ContentRequestContext request) 
{
         // if clustered, send request to cluster manager
         if (properties.isClusterManager()) {

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/b43fe6f9/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
index 5db99cf..91ce8e9 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-content-viewer/src/main/java/org/apache/nifi/web/ContentViewerController.java
@@ -24,7 +24,6 @@ import java.io.InputStream;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
-import javax.servlet.annotation.WebServlet;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -47,7 +46,6 @@ import 
org.springframework.security.access.AccessDeniedException;
  * (original, formatted, hex). If a data viewer is registered for the detected
  * content type, it will include the markup it generates in the response.
  */
-@WebServlet(name = "ContentViewerController", urlPatterns = {"/viewer"})
 public class ContentViewerController extends HttpServlet {
 
     private static final Logger logger = 
LoggerFactory.getLogger(ContentViewerController.class);

Reply via email to