do the same in the cases we are just moving parts around and not changing their caches (ie their taskInventory)

httptests
UbitUmarov 2017-05-04 12:08:10 +01:00
parent 3a8dd24fd1
commit 3402819888
12 changed files with 21 additions and 23 deletions

View File

@ -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);

View File

@ -146,7 +146,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
child.TriggerScriptChangedEvent(Changed.OWNER);
child.ApplyNextOwnerPermissions();
}
group.AggregatePerms();
group.InvalidateDeepEffectivePerms();
}
part.ObjectSaleType = 0;

View File

@ -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;
}

View File

@ -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();

View File

@ -2094,7 +2094,7 @@ namespace OpenSim.Region.Framework.Scenes
child.TriggerScriptChangedEvent(Changed.OWNER);
child.ApplyNextOwnerPermissions();
}
copy.AggregatePerms();
copy.InvalidateEffectivePerms();
}
}

View File

@ -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;
}

View File

@ -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

View File

@ -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);

View File

@ -174,7 +174,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
child.TriggerScriptChangedEvent(Changed.OWNER);
child.ApplyNextOwnerPermissions();
}
hostgroup.AggregatePerms();
hostgroup.InvalidateEffectivePerms();
}
hostgroup.RootPart.ObjectSaleType = 0;

View File

@ -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());
}

View File

@ -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;
}

View File

@ -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;
}