From 10922c2a1a129050e9b29fe1193d48edc1822fe9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 30 Apr 2017 12:51:12 +0100 Subject: exclude lms from permissions checks. They are full rights, and broken on all dbs --- .../Framework/Scenes/SceneObjectPartInventory.cs | 36 +++------------------- 1 file changed, 5 insertions(+), 31 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 894078d..946ed09 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -1332,6 +1332,8 @@ namespace OpenSim.Region.Framework.Scenes { foreach (TaskInventoryItem item in m_items.Values) { + if(item.InvType == (sbyte)InventoryType.Landmark) + continue; owner &= item.CurrentPermissions; group &= item.GroupPermissions; everyone &= item.EveryonePermissions; @@ -1346,6 +1348,9 @@ namespace OpenSim.Region.Framework.Scenes foreach (TaskInventoryItem item in m_items.Values) { + if(item.InvType == (sbyte)InventoryType.Landmark) + continue; + if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Copy) == 0) mask &= ~((uint)PermissionMask.FoldedCopy); if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Transfer) == 0) @@ -1353,19 +1358,6 @@ namespace OpenSim.Region.Framework.Scenes if ((item.CurrentPermissions & item.NextPermissions & (uint)PermissionMask.Export) == 0) mask &= ~((uint)PermissionMask.FoldedExport); - // this breaks some SL legal use cases - // there should be no folding from task inventory -/* - if (item.InvType == (int)InventoryType.Object) - { - if ((item.CurrentPermissions & ((uint)PermissionMask.FoldedCopy)) == 0) - mask &= ~((uint)PermissionMask.FoldedCopy); - if ((item.CurrentPermissions & ((uint)PermissionMask.FoldedTransfer)) == 0) - mask &= ~((uint)PermissionMask.FoldedTransfer); - if ((item.CurrentPermissions & (uint)PermissionMask.FoldedExport) == 0) - mask &= ~((uint)PermissionMask.FoldedExport); - } -*/ if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0) mask &= ~(uint)PermissionMask.Copy; if ((item.CurrentPermissions & (uint)PermissionMask.Transfer) == 0) @@ -1380,24 +1372,6 @@ namespace OpenSim.Region.Framework.Scenes { foreach (TaskInventoryItem item in m_items.Values) { - - // this breaks legal SL use cases - // there should be no unfold into task inventory -/* - if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & (uint)PermissionMask.FoldedMask) != 0) - { -// m_log.DebugFormat ( -// "[SCENE OBJECT PART INVENTORY]: Applying next permissions {0} to {1} in {2} with current {3}, base {4}, everyone {5}", -// item.NextPermissions, item.Name, m_part.Name, item.CurrentPermissions, item.BasePermissions, item.EveryonePermissions); - - if ((item.CurrentPermissions & ((uint)PermissionMask.FoldedCopy)) == 0) - item.CurrentPermissions &= ~(uint)PermissionMask.Copy; - if ((item.CurrentPermissions & ((uint)PermissionMask.FoldedTransfer)) == 0) - item.CurrentPermissions &= ~(uint)PermissionMask.Transfer; - if ((item.CurrentPermissions & ((uint)PermissionMask.FoldedModify)) == 0) - item.CurrentPermissions &= ~(uint)PermissionMask.Modify; - } -*/ item.CurrentPermissions &= item.NextPermissions; item.BasePermissions &= item.NextPermissions; item.EveryonePermissions &= item.NextPermissions; -- cgit v1.1