From 1d9a9e6004e249100c96659fd1d71f6d5cee7bb1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 24 Apr 2014 14:11:42 -0700 Subject: 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. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index b86f349..bb9f457 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -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) { diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 529bc9f..0356599 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -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; -- cgit v1.1