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

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

aaa: more sync fixes

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1120720
Topic: AAA
Change-Id: Ib2611bdc3648525268f4deee8b2ceaa01caca3c1
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M 
backend/manager/modules/aaa/src/main/java/org/ovirt/engine/core/aaa/AuthzUtils.java
1 file changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/12/30612/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 2ca4eff..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,13 +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())) {
-            constructGroupsMembershipTree(memberOf, GroupRecord.GROUPS, 
groupsCache);
-            groups.add(groupsCache.get(memberOf.get(GroupRecord.ID)));
+            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/30612
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2611bdc3648525268f4deee8b2ceaa01caca3c1
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to