Github user markap14 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/884#discussion_r75307263
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
 ---
    @@ -2084,7 +2086,45 @@ public Response getComponentHistory(
                 )
                 @PathParam("componentId") final String componentId) {
     
    -        authorizeFlow();
    +        serviceFacade.authorizeAccess(lookup -> {
    +            final NiFiUser user = NiFiUserUtils.getNiFiUser();
    +
    +            // authorize the flow
    +            authorizeFlow();
    +
    +            boolean authorized = false;
    --- End diff --
    
    @mcgilman I think we can get rid of this 'authorized' variable all together 
here. Instead, we can just do a 'return' where we have 'authorized = true' and 
then we can avoid ever even needing to check it. Seems like it would make the 
code a little simpler & easier to follow - what you do think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to