aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Addons/Groups/Remote
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-07-31 21:32:20 +0100
committerJustin Clark-Casey (justincc)2014-07-31 21:32:20 +0100
commitdfd0c2a54ab345e6120ae7f8d75870959771ef11 (patch)
tree1990e034ae4343508b681cf0696cedadcd83bf74 /OpenSim/Addons/Groups/Remote
parentDon't overwrite the null result with the true result is groups service REMOVE... (diff)
downloadopensim-SC-dfd0c2a54ab345e6120ae7f8d75870959771ef11.zip
opensim-SC-dfd0c2a54ab345e6120ae7f8d75870959771ef11.tar.gz
opensim-SC-dfd0c2a54ab345e6120ae7f8d75870959771ef11.tar.bz2
opensim-SC-dfd0c2a54ab345e6120ae7f8d75870959771ef11.tar.xz
If REMOVEAGENTFROMGROUP core groups call fails because requesting agent does not have sufficient permission, return null failure result rather than true.
On non-HG this is on the only recognized failure state so we can return more information in the error result. On HG there are multiple failure states which would require more work to distinguish, so currently return the unsatisfying "Internal Error" like some other existing calls.
Diffstat (limited to 'OpenSim/Addons/Groups/Remote')
-rw-r--r--OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
index 5cf6ec7..26e844e 100644
--- a/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
+++ b/OpenSim/Addons/Groups/Remote/GroupsServiceRobustConnector.cs
@@ -285,9 +285,10 @@ namespace OpenSim.Groups
285 string agentID = request["AgentID"].ToString(); 285 string agentID = request["AgentID"].ToString();
286 string requestingAgentID = request["RequestingAgentID"].ToString(); 286 string requestingAgentID = request["RequestingAgentID"].ToString();
287 287
288 m_GroupsService.RemoveAgentFromGroup(requestingAgentID, agentID, groupID); 288 if (!m_GroupsService.RemoveAgentFromGroup(requestingAgentID, agentID, groupID))
289 289 NullResult(result, string.Format("Insufficient permissions.", agentID));
290 result["RESULT"] = "true"; 290 else
291 result["RESULT"] = "true";
291 } 292 }
292 293
293 //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); 294 //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);