Fix bad child prim permissions that can make objects change perms after rezzing

This commit is contained in:
Melanie
2012-08-23 23:09:32 +02:00
parent 450207d4d8
commit c1a0c7fad1
3 changed files with 39 additions and 3 deletions

View File

@@ -2852,6 +2852,9 @@ namespace OpenSim.Region.Framework.Scenes
// Can't do this yet since backup still makes use of the root part without any synchronization
// objectGroup.m_rootPart = null;
// If linking prims with different permissions, fix them
AdjustChildPrimPermissions();
AttachToBackup();
// Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
@@ -3391,12 +3394,21 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void AdjustChildPrimPermissions()
{
ForEachPart(part =>
{
if (part != RootPart)
part.ClonePermissions(RootPart);
});
}
public void UpdatePermissions(UUID AgentID, byte field, uint localID,
uint mask, byte addRemTF)
{
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF);
RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
AdjustChildPrimPermissions();
HasGroupChanged = true;