mcgilman commented on a change in pull request #3637: NIFI-6400 Better options, 
consistent ids for ShellUserGroupProvider.
URL: https://github.com/apache/nifi/pull/3637#discussion_r311712055
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-shell-authorizer/src/main/java/org/apache/nifi/authorization/ShellUserGroupProvider.java
 ##########
 @@ -445,20 +467,21 @@ private void rebuildUsers(List<String> userLines, 
Map<String, User> idToUser, Ma
             if (record.length > 2) {
                 String name = record[0], id = record[1], gid = record[2];
 
-                if (name != null && id != null && !name.equals("") && 
!id.equals("")) {
-
-                    User user = new 
User.Builder().identity(name).identifier(id).build();
-                    idToUser.put(id, user);
+                if (name != null && id != null && !name.equals("") && 
!id.equals("") && !excludeUsers.matcher(name).matches()) {
+                    String identifier = getNameBasedUUID(id);
+                    User user = new 
User.Builder().identity(name).identifier(identifier).build();
 
 Review comment:
   Can we use `User.Builder.identifierGenerateFromSeed`?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to