nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] mcgilman commented on a change in pull request #3891: NIFI-6849: On startup, NiFi should be more liberal about what it's willing to inherit from cluster
Date Mon, 06 Apr 2020 18:59:53 GMT
mcgilman commented on a change in pull request #3891: NIFI-6849: On startup, NiFi should be
more liberal about what it's willing to inherit from cluster
URL: https://github.com/apache/nifi/pull/3891#discussion_r404305961
 
 

 ##########
 File path: nifi-framework-api/src/main/java/org/apache/nifi/authorization/AbstractPolicyBasedAuthorizer.java
 ##########
 @@ -337,23 +344,23 @@ public final synchronized AccessPolicy addAccessPolicy(AccessPolicy
accessPolicy
      */
     @Override
     public final void checkInheritability(String proposedFingerprint) throws AuthorizationAccessException,
UninheritableAuthorizationsException {
+        final PoliciesUsersAndGroups policiesUsersAndGroups;
         try {
             // ensure we understand the proposed fingerprint
-            parsePoliciesUsersAndGroups(proposedFingerprint);
+            policiesUsersAndGroups = parsePoliciesUsersAndGroups(proposedFingerprint);
         } catch (final AuthorizationAccessException e) {
             throw new UninheritableAuthorizationsException("Unable to parse proposed fingerprint:
" + e);
         }
 
-        final List<User> users = getSortedUsers();
-        final List<Group> groups = getSortedGroups();
-        final List<AccessPolicy> accessPolicies = getSortedAccessPolicies();
-
-        // ensure we're in a state to inherit
-        if (!users.isEmpty() || !groups.isEmpty() || !accessPolicies.isEmpty()) {
+        if (!isInheritable(policiesUsersAndGroups)) {
 
 Review comment:
   1) `policiesUsersAndGroups` is not used in `isInheritable`.
   2) Does it make sense to still have this check if we support force inheriting? Failing
on parse makes sense but not sure about this one.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message