diff options
author | Justin Clark-Casey (justincc) | 2014-03-12 19:31:04 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-03-12 19:31:04 +0000 |
commit | beba20846f1935e2769f78fb0c87746cf77a6b50 (patch) | |
tree | cea7c1bce6d3b3938d61620d15ae73cc7b535985 /OpenSim/Addons/Groups | |
parent | Enable MapImageServiceModule with no refresh (diff) | |
download | opensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.zip opensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.tar.gz opensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.tar.bz2 opensim-SC-beba20846f1935e2769f78fb0c87746cf77a6b50.tar.xz |
When sending group notices through group messaging, allow the agent ID to use for fetching group data to be different from im.fromAgentID
This is because xmlrpcgroups currently always checks visibility for the requesting agent ID (unlike Groups v2, which can accept UUID.Zero)
But group notice IMs have a from agent which is the group rather than the sending agent.
Further addresses http://opensimulator.org/mantis/view.php?id=7037
Diffstat (limited to 'OpenSim/Addons/Groups')
-rw-r--r-- | OpenSim/Addons/Groups/GroupsMessagingModule.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Addons/Groups/GroupsMessagingModule.cs b/OpenSim/Addons/Groups/GroupsMessagingModule.cs index f701e48..92528a2 100644 --- a/OpenSim/Addons/Groups/GroupsMessagingModule.cs +++ b/OpenSim/Addons/Groups/GroupsMessagingModule.cs | |||
@@ -83,7 +83,6 @@ namespace OpenSim.Groups | |||
83 | private Dictionary<UUID, List<string>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<string>>(); | 83 | private Dictionary<UUID, List<string>> m_groupsAgentsDroppedFromChatSession = new Dictionary<UUID, List<string>>(); |
84 | private Dictionary<UUID, List<string>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<string>>(); | 84 | private Dictionary<UUID, List<string>> m_groupsAgentsInvitedToChatSession = new Dictionary<UUID, List<string>>(); |
85 | 85 | ||
86 | |||
87 | #region Region Module interfaceBase Members | 86 | #region Region Module interfaceBase Members |
88 | 87 | ||
89 | public void Initialise(IConfigSource config) | 88 | public void Initialise(IConfigSource config) |
@@ -242,13 +241,18 @@ namespace OpenSim.Groups | |||
242 | 241 | ||
243 | public void SendMessageToGroup(GridInstantMessage im, UUID groupID) | 242 | public void SendMessageToGroup(GridInstantMessage im, UUID groupID) |
244 | { | 243 | { |
245 | SendMessageToGroup(im, groupID, null); | 244 | SendMessageToGroup(im, groupID, UUID.Zero, null); |
246 | } | 245 | } |
247 | 246 | ||
248 | public void SendMessageToGroup(GridInstantMessage im, UUID groupID, Func<GroupMembersData, bool> sendCondition) | 247 | public void SendMessageToGroup( |
248 | GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func<GroupMembersData, bool> sendCondition) | ||
249 | { | 249 | { |
250 | UUID fromAgentID = new UUID(im.fromAgentID); | 250 | UUID fromAgentID = new UUID(im.fromAgentID); |
251 | |||
252 | // Unlike current XmlRpcGroups, Groups V2 can accept UUID.Zero when a perms check for the requesting agent | ||
253 | // is not necessary. | ||
251 | List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), groupID); | 254 | List<GroupMembersData> groupMembers = m_groupData.GetGroupMembers(UUID.Zero.ToString(), groupID); |
255 | |||
252 | int groupMembersCount = groupMembers.Count; | 256 | int groupMembersCount = groupMembers.Count; |
253 | PresenceInfo[] onlineAgents = null; | 257 | PresenceInfo[] onlineAgents = null; |
254 | 258 | ||