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 --- .../Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index aed03b3..1117f2a 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs @@ -50,8 +50,7 @@ namespace OpenSim.Region.ClientStack.Linden [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] public class NewFileAgentInventoryVariablePriceModule : INonSharedRegionModule { -// private static readonly ILog m_log = -// LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); +// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; // private IAssetService m_assetService; @@ -210,6 +209,9 @@ namespace OpenSim.Region.ClientStack.Linden UUID inventoryItem, UUID parentFolder, byte[] data, string inventoryType, string assetType,UUID AgentID) { +// m_log.DebugFormat( +// "[NEW FILE AGENT INVENTORY VARIABLE PRICE MODULE]: Upload complete for {0}", inventoryItem); + sbyte assType = 0; sbyte inType = 0; @@ -259,13 +261,13 @@ namespace OpenSim.Region.ClientStack.Linden item.AssetType = assType; item.InvType = inType; item.Folder = parentFolder; - item.CurrentPermissions = (uint)PermissionMask.All; + item.CurrentPermissions + = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer); item.BasePermissions = (uint)PermissionMask.All; item.EveryOnePermissions = 0; item.NextPermissions = (uint)PermissionMask.All; item.CreationDate = Util.UnixTimeSinceEpoch(); m_scene.AddInventoryItem(item); - } } } -- cgit v1.1