From 5f4c4df227025c6b6156ce8238b56553dca4b5ae Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 26 Mar 2013 03:40:06 +0000 Subject: Phase 1 of implementing a transfer permission. Overwrite libOMV's PermissionMask with our own and add export permissions as well as a new definition for "All" as meaning "all conventional permissions" rather than "all possible permissions" --- OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs | 5 +++-- .../Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs index 20df8a6..8752404 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs @@ -49,6 +49,7 @@ using OpenSim.Services.Interfaces; using Caps = OpenSim.Framework.Capabilities.Caps; using OSDArray = OpenMetaverse.StructuredData.OSDArray; using OSDMap = OpenMetaverse.StructuredData.OSDMap; +using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.ClientStack.Linden { @@ -705,9 +706,9 @@ namespace OpenSim.Region.ClientStack.Linden // 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); + = (uint)(PermissionMask.Move | PermissionMask.Copy | PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Export); - item.BasePermissions = (uint)PermissionMask.All; + item.BasePermissions = (uint)PermissionMask.All | (uint)PermissionMask.Export; item.EveryOnePermissions = 0; item.NextPermissions = (uint)PermissionMask.All; item.CreationDate = Util.UnixTimeSinceEpoch(); diff --git a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs index 5529550..f69a0bb 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/NewFileAgentInventoryVariablePriceModule.cs @@ -44,6 +44,7 @@ using OpenSim.Region.Framework.Scenes; using OpenSim.Services.Interfaces; using Caps = OpenSim.Framework.Capabilities.Caps; using OpenSim.Framework.Capabilities; +using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.ClientStack.Linden { -- cgit v1.1 From e82fab34d7377a7d9bfc223f093ac67b393677cc Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 26 Mar 2013 19:00:30 +0000 Subject: Implement a pref to turn on the simulator ExportSupported feature entry. This tells the viewer to enable the UI for export permissions. WARNING: If your inventory store contains invalid flags data, this will result in items becoming exportable! Don't turn this on in production until it's complete! --- OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/Caps') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs index 6ef8815..7d9f935 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/SimulatorFeaturesModule.cs @@ -70,6 +70,7 @@ namespace OpenSim.Region.ClientStack.Linden private string m_MapImageServerURL = string.Empty; private string m_SearchURL = string.Empty; + private bool m_ExportSupported = false; #region ISharedRegionModule Members @@ -87,6 +88,8 @@ namespace OpenSim.Region.ClientStack.Linden } m_SearchURL = config.GetString("SearchServerURI", string.Empty); + + m_ExportSupported = config.GetBoolean("ExportSupported", m_ExportSupported); } AddDefaultFeatures(); @@ -152,6 +155,9 @@ namespace OpenSim.Region.ClientStack.Linden if (m_SearchURL != string.Empty) gridServicesMap["search"] = m_SearchURL; m_features["GridServices"] = gridServicesMap; + + if (m_ExportSupported) + m_features["ExportSupported"] = true; } } -- cgit v1.1 From 876d0d310f3c7248a4a6fc29d8babe55a7b1e570 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 28 Mar 2013 01:36:34 +0000 Subject: Add "show eq" console command to show numbers of messages in agent event queues. For debugging purposes. --- .../Linden/Caps/EventQueue/EventQueueGetModule.cs | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'OpenSim/Region/ClientStack/Linden/Caps') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 3cc3950..624378e 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -97,6 +97,14 @@ namespace OpenSim.Region.ClientStack.Linden + " >= 1 - turns on outgoing event logging\n" + " >= 2 - turns on poll notification", HandleDebugEq); + + MainConsole.Instance.Commands.AddCommand( + "Debug", + false, + "show eq", + "show eq", + "Show contents of event queues for logged in avatars. Used for debugging.", + HandleShowEq); } public void RemoveRegion(Scene scene) @@ -148,6 +156,21 @@ namespace OpenSim.Region.ClientStack.Linden } } + protected void HandleShowEq(string module, string[] args) + { + MainConsole.Instance.OutputFormat("For scene {0}", m_scene.Name); + + lock (queues) + { + foreach (KeyValuePair> kvp in queues) + { + MainConsole.Instance.OutputFormat( + "For agent {0} there are {1} messages queued for send.", + kvp.Key, kvp.Value.Count); + } + } + } + /// /// Always returns a valid queue /// -- cgit v1.1 From 617637c788045f5776d21fc4ce246f3a8d6ecfb8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 28 Mar 2013 01:41:23 +0000 Subject: minor: Fix usage error message for "debug eq" console command --- .../Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/Linden/Caps') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs index 624378e..c7d4283 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs @@ -146,7 +146,7 @@ namespace OpenSim.Region.ClientStack.Linden if (!(args.Length == 3 && int.TryParse(args[2], out debugLevel))) { - MainConsole.Instance.OutputFormat("Usage: debug eq [0|1]"); + MainConsole.Instance.OutputFormat("Usage: debug eq [0|1|2]"); } else { -- cgit v1.1