aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2011-04-01 22:04:29 +0100
committerMelanie2011-04-01 22:04:29 +0100
commit3a113f9902b859d11c200f9b0db06c2317eb53cc (patch)
treeefe807f23fdc94caaac21378e90cb62187a1f7ac
parentcheck threat configuration for LSL print() (diff)
downloadopensim-SC_OLD-3a113f9902b859d11c200f9b0db06c2317eb53cc.zip
opensim-SC_OLD-3a113f9902b859d11c200f9b0db06c2317eb53cc.tar.gz
opensim-SC_OLD-3a113f9902b859d11c200f9b0db06c2317eb53cc.tar.bz2
opensim-SC_OLD-3a113f9902b859d11c200f9b0db06c2317eb53cc.tar.xz
A stab at making CHANGED_OWNER work
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs24
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs10
2 files changed, 12 insertions, 22 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 798547a..8d0c35a 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -668,28 +668,18 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
668 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0) 668 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
669 part.GroupMask = item.GroupPermissions; 669 part.GroupMask = item.GroupPermissions;
670 } 670 }
671
672 foreach (SceneObjectPart part in group.Parts)
673 {
674 part.LastOwnerID = part.OwnerID;
675 part.OwnerID = item.Owner;
676 part.Inventory.ChangeInventoryOwner(item.Owner);
677 }
671 678
672 group.ApplyNextOwnerPermissions(); 679 group.ApplyNextOwnerPermissions();
673 } 680 }
674 } 681 }
675 682
676 foreach (SceneObjectPart part in group.Parts)
677 {
678 if ((part.OwnerID != item.Owner) || (item.CurrentPermissions & 16) != 0)
679 {
680 part.LastOwnerID = part.OwnerID;
681 part.OwnerID = item.Owner;
682 part.Inventory.ChangeInventoryOwner(item.Owner);
683 part.GroupMask = 0; // DO NOT propagate here
684 }
685 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0)
686 part.EveryoneMask = item.EveryOnePermissions;
687 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0)
688 part.NextOwnerMask = item.NextPermissions;
689 if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteGroup) != 0)
690 part.GroupMask = item.GroupPermissions;
691 }
692
693 rootPart.TrimPermissions(); 683 rootPart.TrimPermissions();
694 684
695 if (!attachment) 685 if (!attachment)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index fa404c0..3281eab 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -175,12 +175,12 @@ namespace OpenSim.Region.Framework.Scenes
175 foreach (TaskInventoryItem item in items) 175 foreach (TaskInventoryItem item in items)
176 { 176 {
177 if (ownerId != item.OwnerID) 177 if (ownerId != item.OwnerID)
178 {
179 item.LastOwnerID = item.OwnerID; 178 item.LastOwnerID = item.OwnerID;
180 item.OwnerID = ownerId; 179
181 item.PermsMask = 0; 180 item.OwnerID = ownerId;
182 item.PermsGranter = UUID.Zero; 181 item.PermsMask = 0;
183 } 182 item.PermsGranter = UUID.Zero;
183 item.OwnerChanged = true;
184 } 184 }
185 } 185 }
186 186