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 --- .../Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index cf0c28b..be699db 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -422,7 +422,7 @@ namespace OpenSim.Region.ClientStack.Linden string assetType) { m_log.DebugFormat( - "Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}", + "[BUNCH OF CAPS]: Uploaded asset {0} for inventory item {1}, inv type {2}, asset type {3}", assetID, inventoryItem, inventoryType, assetType); sbyte assType = 0; @@ -625,7 +625,12 @@ namespace OpenSim.Region.ClientStack.Linden item.AssetType = assType; item.InvType = inType; item.Folder = parentFolder; - item.CurrentPermissions = (uint)PermissionMask.All; + + // If we set PermissionMask.All then when we rez the item the next permissions will replace the current + // (owner) permissions. This becomes a problem if next permissions are changed. + item.CurrentPermissions + = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); + item.BasePermissions = (uint)PermissionMask.All; item.EveryOnePermissions = 0; item.NextPermissions = (uint)PermissionMask.All; -- cgit v1.1