aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorDr Scofield2008-09-22 11:20:09 +0000
committerDr Scofield2008-09-22 11:20:09 +0000
commit7def786ef4d62c2ffad8cea0cba7db033f8f0d27 (patch)
tree4da62a195714ea1206fd4d3b3688b22c31ce254c /OpenSim/Region
parentRemove the script engine identifier tag, so the compiler just sees (diff)
downloadopensim-SC_OLD-7def786ef4d62c2ffad8cea0cba7db033f8f0d27.zip
opensim-SC_OLD-7def786ef4d62c2ffad8cea0cba7db033f8f0d27.tar.gz
opensim-SC_OLD-7def786ef4d62c2ffad8cea0cba7db033f8f0d27.tar.bz2
opensim-SC_OLD-7def786ef4d62c2ffad8cea0cba7db033f8f0d27.tar.xz
cleanups in inventory REST code. also, disables digest authentications
for inventory REST calls for the time being, as firefox, curl, and also python's urllib2 cannot authenticate using digest auth. fix permission checking for prim inventory to be the same as for normal edit ops.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs30
2 files changed, 28 insertions, 5 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index bd67f1e..c649493 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -5200,6 +5200,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5200 } 5200 }
5201 break; 5201 break;
5202 case PacketType.UpdateTaskInventory: 5202 case PacketType.UpdateTaskInventory:
5203 m_log.DebugFormat("[AMW] UpdateTaskInventory request");
5203 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack; 5204 UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket)Pack;
5204 if (OnUpdateTaskInventory != null) 5205 if (OnUpdateTaskInventory != null)
5205 { 5206 {
@@ -5266,7 +5267,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5266 break; 5267 break;
5267 5268
5268 case PacketType.RezScript: 5269 case PacketType.RezScript:
5269 5270 m_log.DebugFormat("[AMW] RezScript");
5270 //Console.WriteLine(Pack.ToString()); 5271 //Console.WriteLine(Pack.ToString());
5271 RezScriptPacket rezScriptx = (RezScriptPacket)Pack; 5272 RezScriptPacket rezScriptx = (RezScriptPacket)Pack;
5272 5273
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index c670076..a188701 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1186,11 +1186,21 @@ namespace OpenSim.Region.Environment.Scenes
1186 1186
1187 if (part != null) 1187 if (part != null)
1188 { 1188 {
1189 if (part.OwnerID != remoteClient.AgentId)
1190 return;
1191 1189
1192 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1190 // replacing the following two checks with the
1193 return; 1191 // ExternalChecks.ExternalChecksCanEditObject(...)
1192 // call
1193
1194 // if (part.OwnerID != remoteClient.AgentId)
1195 // return;
1196
1197 // if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
1198 // return;
1199
1200 if (!ExternalChecks.ExternalChecksCanEditObject(part.UUID, remoteClient.AgentId))
1201 {
1202 return;
1203 }
1194 1204
1195 TaskInventoryItem currentItem = part.GetInventoryItem(itemID); 1205 TaskInventoryItem currentItem = part.GetInventoryItem(itemID);
1196 1206
@@ -1283,11 +1293,23 @@ System.Console.WriteLine("Item asset {0}, request asset {1}", prevItem.AssetID.T
1283 SceneObjectPart part = GetSceneObjectPart(localID); 1293 SceneObjectPart part = GetSceneObjectPart(localID);
1284 if (part != null) 1294 if (part != null)
1285 { 1295 {
1296
1297 /*
1286 if (part.OwnerID != remoteClient.AgentId) 1298 if (part.OwnerID != remoteClient.AgentId)
1299 {
1287 return; 1300 return;
1301 }
1288 1302
1289 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0) 1303 if ((part.OwnerMask & (uint)PermissionMask.Modify) == 0)
1304 {
1290 return; 1305 return;
1306 }
1307 */
1308
1309 if (!ExternalChecks.ExternalChecksCanEditObject(part.UUID, remoteClient.AgentId))
1310 {
1311 return;
1312 }
1291 1313
1292 part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID); 1314 part.ParentGroup.AddInventoryItem(remoteClient, localID, item, copyID);
1293 // TODO: set this to "true" when scripts in inventory have persistent state to fire on_rez 1315 // TODO: set this to "true" when scripts in inventory have persistent state to fire on_rez