Fix bad child prim permissions that can make objects change perms after rezzing
Port from Avinationintegration
parent
aede42b875
commit
c557684666
|
@ -1943,6 +1943,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
deleteIDs.Add(localID);
|
deleteIDs.Add(localID);
|
||||||
deleteGroups.Add(grp);
|
deleteGroups.Add(grp);
|
||||||
|
|
||||||
|
// If child prims have invalid perms, fix them
|
||||||
|
grp.AdjustChildPrimPermissions();
|
||||||
|
|
||||||
if (remoteClient == null)
|
if (remoteClient == null)
|
||||||
{
|
{
|
||||||
// Autoreturn has a null client. Nothing else does. So
|
// Autoreturn has a null client. Nothing else does. So
|
||||||
|
|
|
@ -2131,6 +2131,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Can't do this yet since backup still makes use of the root part without any synchronization
|
// Can't do this yet since backup still makes use of the root part without any synchronization
|
||||||
// objectGroup.m_rootPart = null;
|
// objectGroup.m_rootPart = null;
|
||||||
|
|
||||||
|
// If linking prims with different permissions, fix them
|
||||||
|
AdjustChildPrimPermissions();
|
||||||
|
|
||||||
AttachToBackup();
|
AttachToBackup();
|
||||||
|
|
||||||
// Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
|
// Here's the deal, this is ABSOLUTELY CRITICAL so the physics scene gets the update about the
|
||||||
|
@ -2622,12 +2625,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,
|
public void UpdatePermissions(UUID AgentID, byte field, uint localID,
|
||||||
uint mask, byte addRemTF)
|
uint mask, byte addRemTF)
|
||||||
{
|
{
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
|
||||||
for (int i = 0; i < parts.Length; i++)
|
|
||||||
parts[i].UpdatePermissions(AgentID, field, localID, mask, addRemTF);
|
AdjustChildPrimPermissions();
|
||||||
|
|
||||||
HasGroupChanged = true;
|
HasGroupChanged = true;
|
||||||
|
|
||||||
|
|
|
@ -3890,6 +3890,27 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ClonePermissions(SceneObjectPart source)
|
||||||
|
{
|
||||||
|
bool update = false;
|
||||||
|
|
||||||
|
if (BaseMask != source.BaseMask ||
|
||||||
|
OwnerMask != source.OwnerMask ||
|
||||||
|
GroupMask != source.GroupMask ||
|
||||||
|
EveryoneMask != source.EveryoneMask ||
|
||||||
|
NextOwnerMask != source.NextOwnerMask)
|
||||||
|
update = true;
|
||||||
|
|
||||||
|
BaseMask = source.BaseMask;
|
||||||
|
OwnerMask = source.OwnerMask;
|
||||||
|
GroupMask = source.GroupMask;
|
||||||
|
EveryoneMask = source.EveryoneMask;
|
||||||
|
NextOwnerMask = source.NextOwnerMask;
|
||||||
|
|
||||||
|
if (update)
|
||||||
|
SendFullUpdateToAllClients();
|
||||||
|
}
|
||||||
|
|
||||||
public bool IsHingeJoint()
|
public bool IsHingeJoint()
|
||||||
{
|
{
|
||||||
// For now, we use the NINJA naming scheme for identifying joints.
|
// For now, we use the NINJA naming scheme for identifying joints.
|
||||||
|
|
Loading…
Reference in New Issue