From 2ba9dd7eeb88c3b07aae1f7e30b63d0841f2041c Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 12 Jan 2009 13:19:33 +0000 Subject: Cause permissions on root prims to not override folded permissions anymore Fix propagation of folded permissions from object inventory to agent inventory. --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index a8387c4..750b5b9 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -502,8 +502,8 @@ namespace OpenSim.Region.Environment.Scenes itemCopy.CurrentPermissions = itemCopy.BasePermissions; if ((item.CurrentPermissions & 8) != 0) // Propagate slam bit { - itemCopy.CurrentPermissions = item.NextPermissions; - itemCopy.BasePermissions = itemCopy.CurrentPermissions; + itemCopy.BasePermissions &= item.NextPermissions; + itemCopy.CurrentPermissions = itemCopy.BasePermissions; itemCopy.CurrentPermissions |= 8; } @@ -1091,8 +1091,12 @@ namespace OpenSim.Region.Environment.Scenes if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) { - agentItem.BasePermissions = taskItem.NextPermissions; - agentItem.CurrentPermissions = taskItem.NextPermissions | 8; + if (taskItem.InvType == 6) + agentItem.BasePermissions = taskItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13); + else + agentItem.BasePermissions = taskItem.BasePermissions; + agentItem.BasePermissions &= taskItem.NextPermissions; + agentItem.CurrentPermissions = agentItem.BasePermissions | 8; agentItem.NextPermissions = taskItem.NextPermissions; agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions; agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; @@ -1982,6 +1986,8 @@ namespace OpenSim.Region.Environment.Scenes item.NextPermissions = objectGroup.RootPart.NextOwnerMask; item.EveryOnePermissions = objectGroup.RootPart.EveryoneMask; item.GroupPermissions = objectGroup.RootPart.GroupMask; + + item.CurrentPermissions |= 8; // Slam! } // TODO: add the new fields (Flags, Sale info, etc) -- cgit v1.1