[ 
https://issues.apache.org/jira/browse/NIFI-1781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15296789#comment-15296789
 ] 

ASF GitHub Bot commented on NIFI-1781:
--------------------------------------

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

    https://github.com/apache/nifi/pull/461#discussion_r64262070
  
    --- Diff: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ProcessGroupResource.java
 ---
    @@ -2024,6 +1843,24 @@ public Response instantiateTemplate(
         // templates
         // ---------
     
    +    private void authorizeSnippetUsage(final AuthorizableLookup lookup, 
final String groupId, final String snippetId) {
    +        // ensure write access to the target process group
    +        lookup.getProcessGroup(groupId).authorize(authorizer, 
RequestAction.WRITE);
    +
    +        // ensure read permission to every component in the snippet
    +        final Snippet snippet = lookup.getSnippet(snippetId);
    +        final Set<Authorizable> authorizables = new HashSet<>();
    +        
authorizables.addAll(snippet.getProcessGroups().keySet().stream().map(id -> 
lookup.getProcessGroup(id)).collect(Collectors.toSet()));
    --- End diff --
    
    Awesome. Will do!


> Update UI to reflect component level authorization
> --------------------------------------------------
>
>                 Key: NIFI-1781
>                 URL: https://issues.apache.org/jira/browse/NIFI-1781
>             Project: Apache NiFi
>          Issue Type: Sub-task
>          Components: Core UI
>            Reporter: Matt Gilman
>            Assignee: Matt Gilman
>             Fix For: 1.0.0
>
>         Attachments: 0001-NIFI-1781.patch, nifi-component-samples.png, 
> nifi-sample-flow.png
>
>
> - Update to UI to visual access level per component



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to