From 2dbf96593cf216595a1528afa2a668c0f38e1791 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 30 Apr 2017 19:44:49 +0100 Subject: Permissions compatibility hack 1: anyone copy - new permissions require that all items in all object parts contents have anyone copy set. Old code only required it on object. This hack tries to allow objects older than today to still work as before on this. (this is a test, we may need to change it) --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 42f47b5..66c9013 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -338,6 +338,8 @@ namespace OpenSim.Region.Framework.Scenes uint rootEveryonePerms = RootPart.EveryoneMask; uint everyone = rootEveryonePerms; + // date is time of writing april 30th 2017 + bool newObject = (RootPart.CreationDate == 0 || RootPart.CreationDate > 1493574994); SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) { @@ -345,7 +347,8 @@ namespace OpenSim.Region.Framework.Scenes part.AggregateInnerPerms(); owner &= part.AggregatedInnerOwnerPerms; group &= part.AggregatedInnerGroupPerms; - everyone &= part.AggregatedInnerEveryonePerms; + if(newObject) + everyone &= part.AggregatedInnerEveryonePerms; } // recover modify and move rootOwnerPerms &= movemodmask; @@ -407,14 +410,16 @@ namespace OpenSim.Region.Framework.Scenes uint everyone = rootEveryonePerms; bool needUpdate = false; - + // date is time of writing april 30th 2017 + bool newObject = (RootPart.CreationDate == 0 || RootPart.CreationDate > 1493574994); SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) { SceneObjectPart part = parts[i]; owner &= part.AggregatedInnerOwnerPerms; group &= part.AggregatedInnerGroupPerms; - everyone &= part.AggregatedInnerEveryonePerms; + if(newObject) + everyone &= part.AggregatedInnerEveryonePerms; } // recover modify and move rootOwnerPerms &= movemodmask; -- cgit v1.1