From 34028198882be021c49725c342e8d2d494dc7286 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 4 May 2017 12:08:10 +0100 Subject: do the same in the cases we are just moving parts around and not changing their caches (ie their taskInventory) --- OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs | 2 +- .../Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 2 +- .../Region/CoreModules/World/Vegetation/VegetationModule.cs | 2 +- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 +++++----- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 +++++----- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 6 ++---- .../Avatar/Attachments/TempAttachmentsModule.cs | 2 +- .../Scripting/JsonStore/JsonStoreScriptModule.cs | 2 +- .../OptionalModules/World/TreePopulator/TreePopulatorModule.cs | 2 +- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 +- 12 files changed, 21 insertions(+), 23 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs index 69fcb7d..b044e56 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs @@ -357,7 +357,7 @@ namespace OpenSim.Region.ClientStack.Linden rootpart.NextOwnerMask = next_owner_mask; rootpart.Material = (byte)material; - obj.AggregatePerms(); + obj.InvalidateDeepEffectivePerms(); m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index a7a9d1d..6a8f4c0 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs @@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell child.TriggerScriptChangedEvent(Changed.OWNER); child.ApplyNextOwnerPermissions(); } - group.AggregatePerms(); + group.InvalidateDeepEffectivePerms(); } part.ObjectSaleType = 0; diff --git a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs index 167f6b5..4cee7a5 100644 --- a/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs +++ b/OpenSim/Region/CoreModules/World/Vegetation/VegetationModule.cs @@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.World.Vegetation sceneObject.SetGroup(groupID, null); m_scene.AddNewSceneObject(sceneObject, true); - sceneObject.AggregatePerms(); + sceneObject.InvalidateDeepEffectivePerms(); return sceneObject; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index d55311e..bba7a96 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -338,7 +338,7 @@ namespace OpenSim.Region.Framework.Scenes // Update item with new asset item.AssetID = asset.FullID; group.UpdateInventoryItem(item); - group.AggregatePerms(); + group.InvalidateEffectivePerms(); part.SendPropertiesToClient(remoteClient); @@ -1216,7 +1216,7 @@ namespace OpenSim.Region.Framework.Scenes } group.RemoveInventoryItem(localID, itemID); - group.AggregatePerms(); + group.InvalidateEffectivePerms(); } part.SendPropertiesToClient(remoteClient); @@ -1967,7 +1967,7 @@ namespace OpenSim.Region.Framework.Scenes part.Inventory.AddInventoryItem(taskItem, false); part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); - part.ParentGroup.AggregatePerms(); + part.ParentGroup.InvalidateEffectivePerms(); // tell anyone managing scripts that a new script exists EventManager.TriggerNewScript(agentID, part, taskItem.ItemID); @@ -2655,7 +2655,7 @@ namespace OpenSim.Region.Framework.Scenes // We can only call this after adding the scene object, since the scene object references the scene // to find out if scripts should be activated at all. - group.AggregatePerms(); + group.InvalidateEffectivePerms(); group.CreateScriptInstances(param, true, DefaultScriptEngine, 3); group.ScheduleGroupForFullUpdate(); @@ -2752,7 +2752,7 @@ namespace OpenSim.Region.Framework.Scenes // and with this comented code, if user does not set next permissions on the object // and on ALL contents of ALL prims, he may loose rights, making the object useless sog.ApplyNextOwnerPermissions(); - sog.AggregatePerms(); + sog.InvalidateEffectivePerms(); sog.ScheduleGroupForFullUpdate(); diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 91d2879..117d92d 100755 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -2094,7 +2094,7 @@ namespace OpenSim.Region.Framework.Scenes child.TriggerScriptChangedEvent(Changed.OWNER); child.ApplyNextOwnerPermissions(); } - copy.AggregatePerms(); + copy.InvalidateEffectivePerms(); } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 95a5887..6bb92f4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -183,7 +183,7 @@ namespace OpenSim.Region.Framework.Scenes addFromAllowedDrop = (part.ParentGroup.RootPart.GetEffectiveObjectFlags() & (uint)PrimFlags.AllowInventoryDrop) != 0; part.Inventory.AddInventoryItem(taskItem, addFromAllowedDrop); - part.ParentGroup.AggregatePerms(); + part.ParentGroup.InvalidateEffectivePerms(); return true; } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 512656b..93c9b42 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -2943,7 +2943,7 @@ namespace OpenSim.Region.Framework.Scenes if (!m_scene.Permissions.BypassPermissions()) { ApplyNextOwnerPermissions(); - AggregatePerms(); + InvalidateEffectivePerms(); } } @@ -3605,7 +3605,7 @@ namespace OpenSim.Region.Framework.Scenes InvalidBoundsRadius(); InvalidatePartsLinkMaps(); - objectGroup.AggregatePerms(); + objectGroup.InvalidateEffectivePerms(); if (sendEvents) linkPart.TriggerScriptChangedEvent(Changed.LINK); @@ -4163,7 +4163,7 @@ namespace OpenSim.Region.Framework.Scenes // m_log.DebugFormat( // "[SCENE OBJECT GROUP]: RootPart.OwnerMask now {0} for {1} in {2}", // (OpenMetaverse.PermissionMask)RootPart.OwnerMask, Name, Scene.Name); - AggregatePerms(); + InvalidateEffectivePerms(); RootPart.ScheduleFullUpdate(); } @@ -4188,7 +4188,7 @@ namespace OpenSim.Region.Framework.Scenes { foreach (SceneObjectPart part in Parts) part.Inventory.ApplyGodPermissions(RootPart.BaseMask); - AggregatePerms(); + InvalidateEffectivePerms(); } HasGroupChanged = true; @@ -5447,7 +5447,7 @@ namespace OpenSim.Region.Framework.Scenes { part.ResetOwnerChangeFlag(); }); - AggregatePerms(); + InvalidateEffectivePerms(); } // clear some references to easy cg diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 21bc19e..23da90a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -1031,8 +1031,7 @@ namespace OpenSim.Region.Framework.Scenes if (considerChanged) { - m_part.AggregateInnerPerms(); - m_part.ParentGroup.AggregatePerms(); + m_part.ParentGroup.InvalidateDeepEffectivePerms(); HasInventoryChanged = true; m_part.ParentGroup.HasGroupChanged = true; } @@ -1075,8 +1074,7 @@ namespace OpenSim.Region.Framework.Scenes m_items.Remove(itemID); m_items.LockItemsForWrite(false); - m_part.AggregateInnerPerms(); - m_part.ParentGroup.AggregatePerms(); + m_part.ParentGroup.InvalidateDeepEffectivePerms(); m_inventorySerial++; m_part.TriggerScriptChangedEvent(Changed.INVENTORY); diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs index 92b5831..c3f3851 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs @@ -174,7 +174,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments child.TriggerScriptChangedEvent(Changed.OWNER); child.ApplyNextOwnerPermissions(); } - hostgroup.AggregatePerms(); + hostgroup.InvalidateEffectivePerms(); } hostgroup.RootPart.ObjectSaleType = 0; diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index 6cf0092..fe8d962 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs @@ -665,7 +665,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore taskItem.AssetID = asset.FullID; host.Inventory.AddInventoryItem(taskItem, false); - host.ParentGroup.AggregatePerms(); + host.ParentGroup.InvalidateEffectivePerms(); m_comms.DispatchReply(scriptID,1,assetID.ToString(),reqID.ToString()); } diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs index b26fa32..da8c9a3 100644 --- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs +++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs @@ -525,7 +525,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator sceneObject.SetGroup(groupID, null); m_scene.AddNewSceneObject(sceneObject, true); - sceneObject.AggregatePerms(); + sceneObject.InvalidateEffectivePerms(); return sceneObject; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e12cedf..e51a078 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2048,7 +2048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.Inventory.AddInventoryItemExclusive(taskItem, false); else m_host.Inventory.AddInventoryItem(taskItem, false); - m_host.ParentGroup.AggregatePerms(); + m_host.ParentGroup.InvalidateDeepEffectivePerms(); return taskItem; } -- cgit v1.1