aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-14 17:24:56 +0000
committerMelanie Thielker2008-11-14 17:24:56 +0000
commitedee11ff8750d452f012690c556384984795f4be (patch)
tree21738d6ee71f00dea792585ab25557c64e571dca /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parent* Switch default permissions back to false (so they are not on) as they were ... (diff)
downloadopensim-SC-edee11ff8750d452f012690c556384984795f4be.zip
opensim-SC-edee11ff8750d452f012690c556384984795f4be.tar.gz
opensim-SC-edee11ff8750d452f012690c556384984795f4be.tar.bz2
opensim-SC-edee11ff8750d452f012690c556384984795f4be.tar.xz
Reapplying a revised version of Christopher Yeoh's (IBM) patch for allow
inventory drop. Also adds a new flags, "propagate_permissions" to OpenSim.ini to control that feature.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs19
1 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 687a225..2c0c872 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1179,7 +1179,7 @@ namespace OpenSim.Region.Environment.Scenes
1179 destTaskItem.InvType = srcTaskItem.InvType; 1179 destTaskItem.InvType = srcTaskItem.InvType;
1180 destTaskItem.Type = srcTaskItem.Type; 1180 destTaskItem.Type = srcTaskItem.Type;
1181 1181
1182 destPart.AddInventoryItem(destTaskItem); 1182 destPart.AddInventoryItem(destTaskItem, part.OwnerID != destPart.OwnerID);
1183 1183
1184 if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0) 1184 if ((srcTaskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
1185 part.RemoveInventoryItem(itemId); 1185 part.RemoveInventoryItem(itemId);
@@ -1249,10 +1249,17 @@ namespace OpenSim.Region.Environment.Scenes
1249 1249
1250 if (part != null) 1250 if (part != null)
1251 { 1251 {
1252 if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId))
1253 return;
1254
1255 TaskInventoryItem currentItem = part.GetInventoryItem(itemID); 1252 TaskInventoryItem currentItem = part.GetInventoryItem(itemID);
1253 bool allowInventoryDrop = (part.GetEffectiveObjectFlags()
1254 & (uint)PrimFlags.AllowInventoryDrop) != 0;
1255
1256 // Explicity allow anyone to add to the inventory if the
1257 // AllowInventoryDrop flag has been set. Don't however let
1258 // them update an item unless they pass the external checks
1259 //
1260 if (!ExternalChecks.ExternalChecksCanEditObjectInventory(part.UUID, remoteClient.AgentId)
1261 && (currentItem != null || !allowInventoryDrop ))
1262 return;
1256 1263
1257 if (currentItem == null) 1264 if (currentItem == null)
1258 { 1265 {
@@ -1417,7 +1424,7 @@ namespace OpenSim.Region.Environment.Scenes
1417 taskItem.PermsMask = 0; 1424 taskItem.PermsMask = 0;
1418 taskItem.AssetID = asset.FullID; 1425 taskItem.AssetID = asset.FullID;
1419 1426
1420 part.AddInventoryItem(taskItem); 1427 part.AddInventoryItem(taskItem, false);
1421 part.GetProperties(remoteClient); 1428 part.GetProperties(remoteClient);
1422 1429
1423 part.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); 1430 part.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0);
@@ -1512,7 +1519,7 @@ namespace OpenSim.Region.Environment.Scenes
1512 destTaskItem.InvType = srcTaskItem.InvType; 1519 destTaskItem.InvType = srcTaskItem.InvType;
1513 destTaskItem.Type = srcTaskItem.Type; 1520 destTaskItem.Type = srcTaskItem.Type;
1514 1521
1515 destPart.AddInventoryItemExclusive(destTaskItem); 1522 destPart.AddInventoryItemExclusive(destTaskItem, false);
1516 1523
1517 if (running > 0) 1524 if (running > 0)
1518 { 1525 {