byte[] HandlePutRole(Dictionary <string, object> request) { Dictionary <string, object> result = new Dictionary <string, object>(); if (!request.ContainsKey("RequestingAgentID") || !request.ContainsKey("GroupID") || !request.ContainsKey("RoleID") || !request.ContainsKey("Name") || !request.ContainsKey("Description") || !request.ContainsKey("Title") || !request.ContainsKey("Powers") || !request.ContainsKey("OP")) { NullResult(result, "Bad network data"); } else { string op = request["OP"].ToString(); string reason = string.Empty; bool success = false; if (op == "ADD") { success = m_GroupsService.AddGroupRole(request["RequestingAgentID"].ToString(), new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString()), request["Name"].ToString(), request["Description"].ToString(), request["Title"].ToString(), UInt64.Parse(request["Powers"].ToString()), out reason); } else if (op == "UPDATE") { success = m_GroupsService.UpdateGroupRole(request["RequestingAgentID"].ToString(), new UUID(request["GroupID"].ToString()), new UUID(request["RoleID"].ToString()), request["Name"].ToString(), request["Description"].ToString(), request["Title"].ToString(), UInt64.Parse(request["Powers"].ToString())); } result["RESULT"] = success.ToString(); } string xmlString = ServerUtils.BuildXmlResponse(result); //m_log.DebugFormat("[XXX]: resp string: {0}", xmlString); return(Util.UTF8NoBomEncoding.GetBytes(xmlString)); }
public bool AddGroupRole(string RequestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers, out string reason) { return(m_GroupsService.AddGroupRole(RequestingAgentID, groupID, roleID, name, description, title, powers, out reason)); }