Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Optimizing fetchPrincipalIdsRecursively
......................................................................


Patch Set 5:

(2 comments)

nice! two comments, one severe one minor.

http://gerrit.ovirt.org/#/c/29880/5/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java
File 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java:

Line 55:         Set<String> idsToFetch = new HashSet<>();
Line 56:         List<ExtMap> principals = findPrincipalsByIds(extension, 
namespace, ids, true, false);
Line 57:         for (ExtMap principal : principals) {
Line 58:             for (ExtMap memberOf : 
principal.get(PrincipalRecord.GROUPS, Collections.<ExtMap> emptyList())) {
Line 59:                 idsToFetch.add(memberOf.<String> 
get(PrincipalRecord.ID));
GroupRecord.ID?
Line 60:             }
Line 61:         }
Line 62:         while (!idsToFetch.isEmpty()) {
Line 63:             List<ExtMap> groups =


Line 80:             }
Line 81:             principal.put(PrincipalRecord.GROUPS, groups);
Line 82:             constructGroupsMembershipTree(groups, groupsCache);
Line 83: 
Line 84:         }
this loop can go into the constructGroupsMembershipTree, provided you add the 
key as argument, see DirectoryUtils::flatGroups for example I've done.
Line 85:         return principals;
Line 86:     }
Line 87: 
Line 88:     private static void constructGroupsMembershipTree(List<ExtMap> 
groups, Map<String, ExtMap> groupsCache) {


-- 
To view, visit http://gerrit.ovirt.org/29880
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I095bb91810e25d345fcd053cbd51d1d25a4b494d
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to