From ddca5347c31aa9547395ec918b5b5dcd2e498be7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 10 Feb 2012 02:13:15 +0000 Subject: When an asset is uploaded (e.g. a mesh) set individual copy/move/transfer permissions, not PermissionMask.All Setting PermissionMask.All will cause next permissions to replace current permissions when the object is rezzed, since bit 4 will be set. This is not correct behaviour for a freshly uploaded mesh. Freshly rezzed in-world prims also do not have bit 4 set (don't yet know exactly what this is). Should resolve http://opensimulator.org/mantis/view.php?id=5651 --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 9 +++++++++ OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 2 ++ 2 files changed, 11 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index af01624..5a5307c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -347,6 +347,12 @@ namespace OpenSim.Region.Framework.Scenes { item.Name = itemUpd.Name; item.Description = itemUpd.Description; + +// m_log.DebugFormat( +// "[USER INVENTORY]: itemUpd {0} {1} {2} {3}, item {4} {5} {6} {7}", +// itemUpd.NextPermissions, itemUpd.GroupPermissions, itemUpd.EveryOnePermissions, item.Flags, +// item.NextPermissions, item.GroupPermissions, item.EveryOnePermissions, item.CurrentPermissions); + if (item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions)) item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteNextOwner; item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions; @@ -355,6 +361,9 @@ namespace OpenSim.Region.Framework.Scenes item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions; if (item.GroupPermissions != (itemUpd.GroupPermissions & item.BasePermissions)) item.Flags |= (uint)InventoryItemFlags.ObjectOverwriteGroup; + +// m_log.DebugFormat("[USER INVENTORY]: item.Flags {0}", item.Flags); + item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions; item.GroupID = itemUpd.GroupID; item.GroupOwned = itemUpd.GroupOwned; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index f173c95..a73d9b6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -265,6 +265,8 @@ namespace OpenSim.Region.Framework.Scenes public void ApplyNextOwnerPermissions() { +// m_log.DebugFormat("[PRIM INVENTORY]: Applying next owner permissions to {0} {1}", Name, UUID); + SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) parts[i].ApplyNextOwnerPermissions(); -- cgit v1.1