From 478b44f231841aafb2ea19d2b21d0d3826456ad7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 19 Oct 2010 01:54:51 +0100 Subject: Pass in requesting agent ID when GetGroupMembers is called in the XMLRPC groups module This allows the groups xmlrpc server to act appropriately if the requesting agent has permission to see all group members Not sure why this wasn't being done before... --- .../OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs | 4 ++-- OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs index d178e18..25dba7f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs @@ -212,11 +212,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public void SendMessageToGroup(GridInstantMessage im, UUID groupID) { - List groupMembers = m_groupData.GetGroupMembers(UUID.Zero, groupID); + List groupMembers = m_groupData.GetGroupMembers(new UUID(im.fromAgentID), groupID); if (m_debugEnabled) m_log.DebugFormat( - "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} members", + "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members", groupID, groupMembers.Count); foreach (GroupMembersData member in groupMembers) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 6f044e0..0c8113e 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -599,7 +599,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public List GroupMembersRequest(IClientAPI remoteClient, UUID groupID) { - if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); + if (m_debugEnabled) + m_log.DebugFormat( + "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name); + List data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); if (m_debugEnabled) -- cgit v1.1