More on HG inventory and OutboundPermission: disallowing giving inventory to foreigners if OutboundPermission is false
parent
dcfeb95e98
commit
09cb2a37dd
|
@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
// We're fgoing to enforce some stricter permissions if Outbound is false
|
||||
scene.Permissions.OnTakeObject += CanTakeObject;
|
||||
scene.Permissions.OnTakeCopyObject += CanTakeObject;
|
||||
|
||||
scene.Permissions.OnTransferUserInventory += OnTransferUserInventory;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -447,6 +447,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||
return true;
|
||||
}
|
||||
|
||||
private bool OnTransferUserInventory(UUID itemID, UUID userID, UUID recipientID)
|
||||
{
|
||||
if (m_bypassPermissions) return true;
|
||||
|
||||
if (!m_OutboundPermission && !UserManagementModule.IsLocalGridUser(recipientID))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -556,6 +556,9 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
{
|
||||
//Console.WriteLine("Scene.Inventory.cs: GiveInventoryItem");
|
||||
|
||||
if (!Permissions.CanTransferUserInventory(itemId, senderId, recipient))
|
||||
return null;
|
||||
|
||||
InventoryItemBase item = new InventoryItemBase(itemId, senderId);
|
||||
item = InventoryService.GetItem(item);
|
||||
|
||||
|
|
Loading…
Reference in New Issue