From 514249e80ec527c79157bce80f39b8adb1b344c1 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 30 Apr 2017 12:43:09 +0100 Subject: [PATCH] fix new landmarks default permissions --- .../InventoryAccess/InventoryAccessModule.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index a32d7dc5ca..916ddb0a97 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -212,6 +212,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess if (m_Scene.TryGetScenePresence(remoteClient.AgentId, out presence)) { byte[] data = null; + uint everyonemask = 0; + uint groupmask = 0; if (invType == (sbyte)InventoryType.Landmark && presence != null) { @@ -220,6 +222,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess data = Encoding.ASCII.GetBytes(strdata); name = prefix + name; description += suffix; + groupmask = (uint)PermissionMask.AllAndExport; + everyonemask = (uint)(PermissionMask.AllAndExport & ~PermissionMask.Modify); } AssetBase asset = m_Scene.CreateAsset(name, description, assetType, data, remoteClient.AgentId); @@ -227,9 +231,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess m_Scene.CreateNewInventoryItem( remoteClient, remoteClient.AgentId.ToString(), string.Empty, folderID, name, description, 0, callbackID, asset.FullID, asset.Type, invType, - (uint)PermissionMask.All | (uint)PermissionMask.Export, // Base - (uint)PermissionMask.All | (uint)PermissionMask.Export, // Current - 0, nextOwnerMask, 0, creationDate, false); // Data from viewer + (uint)PermissionMask.AllAndExport, // Base + (uint)PermissionMask.AllAndExport, // Current + everyonemask, + nextOwnerMask, groupmask, creationDate, false); // Data from viewer } else {