From 7cfe17b5b39bb6e99abe24ae27c60b51165abe21 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 12 Jan 2011 21:25:38 +0000 Subject: Partial permissions fix for boxed items. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 ++++++++++ OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 7 +++++++ 2 files changed, 17 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index dc2ce48..bc6b165 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -2131,5 +2131,15 @@ namespace OpenSim.Region.Framework.Scenes m_sceneGraph.LinkObjects(root, children); } + + private string PermissionString(uint permissions) + { + PermissionMask perms = (PermissionMask)permissions & + (PermissionMask.Move | + PermissionMask.Copy | + PermissionMask.Transfer | + PermissionMask.Modify); + return perms.ToString(); + } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 90f1d6e..900130a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -946,6 +946,13 @@ namespace OpenSim.Region.Framework.Scenes { foreach (TaskInventoryItem item in m_items.Values) { + if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0) + mask &= ~((uint)PermissionMask.Copy >> 13); + if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0) + mask &= ~((uint)PermissionMask.Transfer >> 13); + if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Modify) == 0) + mask &= ~((uint)PermissionMask.Modify >> 13); + if (item.InvType != (int)InventoryType.Object) { if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0) -- cgit v1.1