anchor.diff:          ], privileges = member}
       },
       {
  -        <<"urn:mace:egi.eu:group:fedcloud.egi.eu:child:role=owner#aai.egi.eu">>,
  +        <<"urn:mace:egi.eu:group:fedcloud.egi.eu:members:role=owner#aai.egi.eu">>,
           #{
               originGroupType => unit,
               topGroupType => team,
  
positive.code:     GroupStructure = binary:replace(GroupStructureEncoded, <<"+">>, <<" ">>, [global]),
      GroupTokens = binary:split(GroupStructure, <<":">>, [global, trim_all]),
  
      {Groups, RoleStr} = case lists:last(GroupTokens) of
          <<"role=", Role/binary>> ->
              {lists:sublist(GroupTokens, length(GroupTokens) - 1), Role};
          _ ->
  
negative.code:         _ -> member
      end,
  
      TopGroupName = hd(GroupNames),
      SubGroupNames = tl(GroupNames),
  
      {MappedSubGroups, _} = lists:mapfoldl(fun(SubGroupName, ParentGroupName) ->
          MappedGroup = #idp_group{
              type = SubGroupsType,
              name = case SubGroupName of
                  ?EGI_COU_ADMINS_GROUP -> <<ParentGroupName/binary, " - ", SubGroupName/binary>>;
                  ?EGI_COU_MEMBERS_GROUP -> <<ParentGroupName/binary, " - ", SubGroupName/binary>>;
                  _ -> SubGroupName
              end,
              privileges = case SubGroupName of
                  ?EGI_COU_ADMINS_GROUP -> admin;
                  _ -> member
              end
          },
          {MappedGroup, SubGroupName}
      end, TopGroupName, SubGroupNames),
  
      Path = [
          #idp_group{type = OriginGroupType, name = Origin},
          #idp_group{type = TopGroupType, name = TopGroupName}
          | MappedSubGroups
      ],
  
      #idp_entitlement{
          idp = egi,
  