Changing the visibility test in groups service to be UUID.Zero.ToString() instead of "all" because some paths in the code assume there's a UUI in the RequestingAgent string.

TeleportWork
Diva Canto 2013-07-28 18:08:50 -07:00
parent 468ddd2373
commit 33b54807a1
4 changed files with 9 additions and 5 deletions

View File

@ -246,7 +246,7 @@ namespace OpenSim.Groups
public void SendMessageToGroup(GridInstantMessage im, UUID groupID) public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
{ {
UUID fromAgentID = new UUID(im.fromAgentID); UUID fromAgentID = new UUID(im.fromAgentID);
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", groupID); List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), groupID);
int groupMembersCount = groupMembers.Count; int groupMembersCount = groupMembers.Count;
PresenceInfo[] onlineAgents = null; PresenceInfo[] onlineAgents = null;
@ -403,7 +403,7 @@ namespace OpenSim.Groups
Scene aScene = m_sceneList[0]; Scene aScene = m_sceneList[0];
GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID); GridRegion regionOfOrigin = aScene.GridService.GetRegionByUUID(aScene.RegionInfo.ScopeID, regionID);
List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers("all", GroupID); List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), GroupID);
List<UUID> alreadySeen = new List<UUID>(); List<UUID> alreadySeen = new List<UUID>();
//if (m_debugEnabled) //if (m_debugEnabled)

View File

@ -254,7 +254,10 @@ namespace OpenSim.Groups
{ {
string url = string.Empty, gname = string.Empty; string url = string.Empty, gname = string.Empty;
if (IsLocal(GroupID, out url, out gname)) if (IsLocal(GroupID, out url, out gname))
return m_LocalGroupsConnector.GetGroupMembers(AgentUUI(RequestingAgentID), GroupID); {
string agentID = AgentUUI(RequestingAgentID);
return m_LocalGroupsConnector.GetGroupMembers(agentID, GroupID);
}
else if (!string.IsNullOrEmpty(url)) else if (!string.IsNullOrEmpty(url))
{ {
ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID); ExtendedGroupMembershipData membership = m_LocalGroupsConnector.GetAgentGroupMembership(RequestingAgentID, RequestingAgentID, GroupID);

View File

@ -256,6 +256,7 @@ namespace OpenSim.Groups
Dictionary<string, object> sendData = new Dictionary<string, object>(); Dictionary<string, object> sendData = new Dictionary<string, object>();
sendData["GroupID"] = GroupID.ToString(); sendData["GroupID"] = GroupID.ToString();
sendData["RequestingAgentID"] = RequestingAgentID; sendData["RequestingAgentID"] = RequestingAgentID;
Dictionary<string, object> ret = MakeRequest("GETGROUPMEMBERS", sendData); Dictionary<string, object> ret = MakeRequest("GETGROUPMEMBERS", sendData);
if (ret == null) if (ret == null)

View File

@ -257,8 +257,8 @@ namespace OpenSim.Groups
// Check visibility? // Check visibility?
// When we don't want to check visibility, we pass it "all" as the requestingAgentID // When we don't want to check visibility, we pass it "all" as the requestingAgentID
bool checkVisibility = !RequestingAgentID.Equals("all"); bool checkVisibility = !RequestingAgentID.Equals(UUID.Zero.ToString());
m_log.DebugFormat("[ZZZ]: AgentID is {0}. checkVisibility is {1}", RequestingAgentID, checkVisibility);
if (checkVisibility) if (checkVisibility)
{ {
// Is the requester a member of the group? // Is the requester a member of the group?