Yair Zaslavsky has posted comments on this change. Change subject: aaa: Fix sync ......................................................................
Patch Set 13: (2 comments) http://gerrit.ovirt.org/#/c/28561/13/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/aaa/DirectoryUtils.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/aaa/DirectoryUtils.java: Line 80: Line 81: for (String id : outNonActiveGroupExternalIds) { Line 82: dbGroupsPerExternalId.get(id).setActive(false); Line 83: DbFacade.getInstance().getDbGroupDao().update(dbGroupsPerExternalId.get(id)); Line 84: } > both of the above should be concluded by the output of the outDirectory*** what do you mean here? Line 85: Line 86: for (DbUser dbUser : dbUsers) { Line 87: if (dbUser.isActive()) { Line 88: DirectoryUser user = outDirectoryUserByIds.get(dbUser.getExternalId()); Line 86: for (DbUser dbUser : dbUsers) { Line 87: if (dbUser.isActive()) { Line 88: DirectoryUser user = outDirectoryUserByIds.get(dbUser.getExternalId()); Line 89: Set<DirectoryGroup> accumulator = new HashSet<>(); Line 90: DirectoryUtils.flatGroups(accumulator, user.getGroups(), outDirectoryGroupsByIds); > I almost sure you have double flat here and within the aaa sync... I would I think the flat should not be here and should exist at the aaa sync. the reason is that at aaa sync i set the flag groups on the user - the user should have info on all the groups he is a member of directly or indirectly. Line 91: user.setGroups(new ArrayList<DirectoryGroup>(accumulator)); Line 92: DbUser userFromDirectory = new DbUser(user); Line 93: userFromDirectory.setGroupIds(DirectoryUtils.getGroupIdsFromUser(user, outDirectoryGroupsByIds)); Line 94: if (!userFromDirectory.equals(dbUser)) { -- 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 <[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
