Yair Zaslavsky has posted comments on this change.

Change subject: aaa: Fix sync
......................................................................


Patch Set 8:

(2 comments)

yes, sorry, i forgot to add a comment straight away that this is probably not 
what you meant, and began fixing this :)
so -

DbUser has no groups (in a sense of set of DbGroup) - in order to get the group 
ids i will either need to work with ExtMap or DirectoryGroup. I do not want to 
add the "getGroupIds" code to AuthzUtils, as it is in aaa, and i cleaned it 
from common related entities.
In DirectoryUtils i work with DirectoryXXX entries

http://gerrit.ovirt.org/#/c/29706/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SyncUsers.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SyncUsers.java:

Line 40:         for (String authz : authzToNamespaceToUserIds.keySet()) {
Line 41:             try {
Line 42:                 ExtensionProxy authzExtension = 
EngineExtensionsManager.getInstance().getExtensionByName(authz);
Line 43:                 for (Entry<String, Set<String>> userIdsPerNamespace : 
authzToNamespaceToUserIds.get(authz).entrySet()) {
Line 44:                     Set<String> userIds = 
userIdsPerNamespace.getValue();
> no reason for temp var
as you wish, IMHO in this case it is more readable.
Line 45:                     for (DirectoryUser directoryUser : 
DirectoryUtils.fetchUsersByIdsRecursively(authzExtension, 
userIdsPerNamespace.getKey(), new ArrayList<String>(userIds))) {
Line 46:                         DirectoryUtils.flatGroups(directoryUser);
Line 47:                         DbUser dbUser = new DbUser(directoryUser);
Line 48:                         
dbUser.setGroupIds(DirectoryUtils.getGroupIdsFromUser(directoryUser));


Line 50:                     }
Line 51:                 }
Line 52:             } catch (ConfigurationException ex) {
Line 53:                 log.error(String.format("The authz extension for %1%s 
has not been found. Users belonging to this extension will be marked as 
inactive. Exception message is %2$s",
Line 54:                         authz, ex.getMessage()));
> debug stack trace?
Done
Line 55:             }
Line 56:         }
Line 57: 
Line 58:         Set<DbUser> inactiveUsers = new HashSet<DbUser>(dbUsers) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3a66a7c235f16ff26cac3a779de688c73d67f4a2
Gerrit-PatchSet: 8
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

Reply via email to