Alon Bar-Lev has posted comments on this change. Change subject: aaa: Using extensions API in built-in authz and auth ......................................................................
Patch Set 17: (3 comments) http://gerrit.ovirt.org/#/c/26602/17/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 113: final ExtUUID command, Line 114: final ExtMap extMap) { Line 115: final List<DirectoryUser> directoryUsers = new ArrayList<>(); Line 116: queryImpl(extension, new QueryResultHandler() { Line 117: private int addedResults = 0; why do you need this and cannot ask for size of directoryUsers? Line 118: Line 119: @Override Line 120: public boolean handle(List<ExtMap> queryResults) { Line 121: boolean result = true; Line 128: } Line 129: } Line 130: return result; Line 131: } Line 132: }, command, extMap); put these two as 1st parameters to ease reading? Line 133: return directoryUsers; Line 134: } Line 135: Line 136: private static List<DirectoryGroup> populateGroups(final ExtensionProxy extension, Line 235: } Line 236: Line 237: private static List<List<String>> getIdsBatches(final ExtensionProxy extension, final List<String> ids) { Line 238: Line 239: int chunk = extension.getContext().<Long> get(Authz.ContextKeys.QUERY_MAX_FILTER_SIZE).intValue() - 10; if you are to use integers all over, I take it back and we convert to int all over in api except flags. I was not aware there are so much issues of using long. Line 240: List<List<String>> batchOfIdsList = new ArrayList<>(); Line 241: for (int counter = 0; counter < ids.size(); counter = counter + chunk) { Line 242: ids.subList(counter, counter + chunk > ids.size() ? ids.size() : counter + chunk); Line 243: } -- To view, visit http://gerrit.ovirt.org/26602 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I916012eab61a96bdb0f366d9dc8462325d7f726f Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Alon Bar-Lev <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
