aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs3
2 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
index 978c288..ce7ed26 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
124 // We're fgoing to enforce some stricter permissions if Outbound is false 124 // We're fgoing to enforce some stricter permissions if Outbound is false
125 scene.Permissions.OnTakeObject += CanTakeObject; 125 scene.Permissions.OnTakeObject += CanTakeObject;
126 scene.Permissions.OnTakeCopyObject += CanTakeObject; 126 scene.Permissions.OnTakeCopyObject += CanTakeObject;
127 127 scene.Permissions.OnTransferUserInventory += OnTransferUserInventory;
128 } 128 }
129 129
130 #endregion 130 #endregion
@@ -447,6 +447,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
447 return true; 447 return true;
448 } 448 }
449 449
450 private bool OnTransferUserInventory(UUID itemID, UUID userID, UUID recipientID)
451 {
452 if (m_bypassPermissions) return true;
453
454 if (!m_OutboundPermission && !UserManagementModule.IsLocalGridUser(recipientID))
455 return false;
456
457 return true;
458 }
459
460
450 #endregion 461 #endregion
451 } 462 }
452} \ No newline at end of file 463} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 2d1a3ef..8e4e307 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -556,6 +556,9 @@ namespace OpenSim.Region.Framework.Scenes
556 { 556 {
557 //Console.WriteLine("Scene.Inventory.cs: GiveInventoryItem"); 557 //Console.WriteLine("Scene.Inventory.cs: GiveInventoryItem");
558 558
559 if (!Permissions.CanTransferUserInventory(itemId, senderId, recipient))
560 return null;
561
559 InventoryItemBase item = new InventoryItemBase(itemId, senderId); 562 InventoryItemBase item = new InventoryItemBase(itemId, senderId);
560 item = InventoryService.GetItem(item); 563 item = InventoryService.GetItem(item);
561 564