Alon Bar-Lev has uploaded a new change for review.

Change subject: aaa: more sync fixes
......................................................................

aaa: more sync fixes

Topic: AAA
Change-Id: Ib2611bdc3648525268f4deee8b2ceaa01caca3c1
Signed-off-by: Alon Bar-Lev <[email protected]>
---
M 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java
1 file changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/95/30595/1

diff --git 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java
 
b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java
index 03c24b0..14ccaa7 100644
--- 
a/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java
+++ 
b/backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java
@@ -92,14 +92,19 @@
         
MultiValueMapUtils.addToMapOfSets(memberOf.<String>get(GroupRecord.NAMESPACE), 
memberOf.<String> get(GroupRecord.ID), idsToFetchPerNamespace);
     }
 
-    private static void constructGroupsMembershipTree(ExtMap entity, ExtKey 
key, Map<String, ExtMap> groupsCache) {
+    private static ExtMap constructGroupsMembershipTree(ExtMap entity, ExtKey 
key, Map<String, ExtMap> groupsCache) {
         List<ExtMap> groups = new ArrayList<>();
         for (ExtMap memberOf : entity.get(key, Collections.<ExtMap> 
emptyList())) {
-            ExtMap cachedGroup = groupsCache.get(memberOf.get(GroupRecord.ID));
-            constructGroupsMembershipTree(cachedGroup, GroupRecord.GROUPS, 
groupsCache);
-            groups.add(cachedGroup);
+            groups.add(
+                constructGroupsMembershipTree(
+                    groupsCache.get(memberOf.get(GroupRecord.ID)).clone(),
+                    GroupRecord.GROUPS,
+                    groupsCache
+                )
+            );
         }
         entity.put(key, groups);
+        return entity;
     }
 
     public static Collection<ExtMap> queryPrincipalRecords(


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2611bdc3648525268f4deee8b2ceaa01caca3c1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to