Fixes a long-standing bug related to god-mode change ownership of objects permissive, where the permissions of the children prims' inventory items were not changed. As a consequence, we couldn't control some of the objects imported via HG and OARs even in god mode.

0.8.0.3
Diva Canto 2014-04-24 14:11:42 -07:00
parent 6efc203ce8
commit 1d9a9e6004
2 changed files with 6 additions and 4 deletions

View File

@ -2040,7 +2040,7 @@ namespace OpenSim.Region.Framework.Scenes
deleteGroups.Add(grp);
// If child prims have invalid perms, fix them
grp.AdjustChildPrimPermissions();
grp.AdjustChildPrimPermissions(false);
if (remoteClient == null)
{

View File

@ -2352,7 +2352,7 @@ namespace OpenSim.Region.Framework.Scenes
// objectGroup.m_rootPart = null;
// If linking prims with different permissions, fix them
AdjustChildPrimPermissions();
AdjustChildPrimPermissions(false);
GroupContainsForeignPrims = true;
@ -2864,7 +2864,7 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void AdjustChildPrimPermissions()
public void AdjustChildPrimPermissions(bool forceTaskInventoryPermissive)
{
uint newOwnerMask = (uint)(PermissionMask.All | PermissionMask.Export) & 0xfffffff8; // Mask folded bits
uint foldedPerms = RootPart.OwnerMask & 3;
@ -2874,6 +2874,8 @@ namespace OpenSim.Region.Framework.Scenes
newOwnerMask &= part.BaseMask;
if (part != RootPart)
part.ClonePermissions(RootPart);
if (forceTaskInventoryPermissive)
part.Inventory.ApplyGodPermissions(part.BaseMask);
});
uint lockMask = ~(uint)(PermissionMask.Move | PermissionMask.Modify);
@ -2887,7 +2889,7 @@ namespace OpenSim.Region.Framework.Scenes
{
RootPart.UpdatePermissions(AgentID, field, localID, mask, addRemTF);
AdjustChildPrimPermissions();
AdjustChildPrimPermissions(Scene.Permissions.IsGod(AgentID));
HasGroupChanged = true;