Yair Zaslavsky has posted comments on this change. Change subject: aaa: Fix sync ......................................................................
Patch Set 13: (2 comments) very partial answers to the comments , i will address the rest later on. http://gerrit.ovirt.org/#/c/28561/13/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/sync/SyncAAAEntries.java File backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/sync/SyncAAAEntries.java: Line 46: authzExtension = EngineExtensionsManager.getInstance().getExtensionByName(authz); Line 47: } catch (ConfigurationException ex) { Line 48: log.warn(String.format("The extension %1$s could not be found. Users associated with this authz extension will not be refreshed.", Line 49: authz)); Line 50: continue; > please do not use continue within catch.. the "logic" part you mentioned is quite long IMHO. Line 51: } Line 52: Line 53: boolean supportRecursiveGroupResolution = Line 54: (authzExtension.getContext().<Long> get(Authz.ContextKeys.CAPABILITIES, 0L) & Authz.Capabilities.RECURSIVE_GROUP_RESOLUTION) != 0L; Line 53: boolean supportRecursiveGroupResolution = Line 54: (authzExtension.getContext().<Long> get(Authz.ContextKeys.CAPABILITIES, 0L) & Authz.Capabilities.RECURSIVE_GROUP_RESOLUTION) != 0L; Line 55: Line 56: Map<String, Set<String>> groupIdsToFetch = Collections.emptyMap(); Line 57: Set<DirectoryGroup> groupsToFetch = new HashSet<>(); > I stopped here... I truly want to see you are using PrincipalRecord and Gro these are not db entries, but the AAA module related entries, I still think we should use AuthzUtils where possible. Line 58: Map<String, Set<String>> usersToFetchPerNamespace = userIdsToFetch.get(authz); Line 59: for (String namespace : usersToFetchPerNamespace.keySet()) { Line 60: List<DirectoryUser> fetchedUsers = AuthzUtils.findPrincipalsByIds( Line 61: authzExtension, -- To view, visit http://gerrit.ovirt.org/28561 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id49b51517a967c7a83e8e73f52181673baa31700 Gerrit-PatchSet: 13 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@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