diff options
author | Melanie Thielker | 2017-01-06 17:05:00 +0000 |
---|---|---|
committer | Melanie Thielker | 2017-01-06 17:05:00 +0000 |
commit | e526e8c5e225e931a5796532bf32b76530388089 (patch) | |
tree | 5673c473bef1e72550c2ef7c8bdfaf400a2fd908 /OpenSim/Region/Framework | |
parent | Remove more calls to that horrible function (diff) | |
download | opensim-SC_OLD-e526e8c5e225e931a5796532bf32b76530388089.zip opensim-SC_OLD-e526e8c5e225e931a5796532bf32b76530388089.tar.gz opensim-SC_OLD-e526e8c5e225e931a5796532bf32b76530388089.tar.bz2 opensim-SC_OLD-e526e8c5e225e931a5796532bf32b76530388089.tar.xz |
Fix the long-standing bug that object permissions set in inventory were lost
NOTE: Items rezzed by users using 0.8 or older will still exhibit broken
behaviour. Until 0.8 becomes end of life, this fix will not produce
dependable results on grids with mixed versions. Grids based on 0.9 will
now work properly.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 18 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 1 |
2 files changed, 13 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9c8dbb6..cb06540 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -627,6 +627,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
627 | itemCopy.AssetType = item.AssetType; | 627 | itemCopy.AssetType = item.AssetType; |
628 | itemCopy.InvType = item.InvType; | 628 | itemCopy.InvType = item.InvType; |
629 | itemCopy.Folder = recipientFolderId; | 629 | itemCopy.Folder = recipientFolderId; |
630 | itemCopy.Flags = item.Flags; | ||
630 | 631 | ||
631 | if (Permissions.PropagatePermissions() && recipient != senderId) | 632 | if (Permissions.PropagatePermissions() && recipient != senderId) |
632 | { | 633 | { |
@@ -643,7 +644,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
643 | // | 644 | // |
644 | // Transfer | 645 | // Transfer |
645 | // Copy | 646 | // Copy |
646 | // Modufy | 647 | // Modify |
647 | uint permsMask = ~ ((uint)PermissionMask.Copy | | 648 | uint permsMask = ~ ((uint)PermissionMask.Copy | |
648 | (uint)PermissionMask.Transfer | | 649 | (uint)PermissionMask.Transfer | |
649 | (uint)PermissionMask.Modify); | 650 | (uint)PermissionMask.Modify); |
@@ -718,6 +719,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
718 | itemCopy.BasePermissions = basePerms; | 719 | itemCopy.BasePermissions = basePerms; |
719 | itemCopy.CurrentPermissions = ownerPerms; | 720 | itemCopy.CurrentPermissions = ownerPerms; |
720 | itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 721 | itemCopy.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
722 | // Need to clear the other inventory slam options. | ||
723 | // That is so we can handle the case where the recipient | ||
724 | // changes the bits in inventory before rezzing | ||
725 | itemCopy.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); | ||
721 | 726 | ||
722 | itemCopy.NextPermissions = item.NextPermissions; | 727 | itemCopy.NextPermissions = item.NextPermissions; |
723 | 728 | ||
@@ -767,9 +772,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
767 | 772 | ||
768 | itemCopy.GroupID = UUID.Zero; | 773 | itemCopy.GroupID = UUID.Zero; |
769 | itemCopy.GroupOwned = false; | 774 | itemCopy.GroupOwned = false; |
770 | itemCopy.Flags = item.Flags; | 775 | itemCopy.SalePrice = 0; //item.SalePrice; |
771 | itemCopy.SalePrice = item.SalePrice; | 776 | itemCopy.SaleType = 0; //item.SaleType; |
772 | itemCopy.SaleType = item.SaleType; | ||
773 | 777 | ||
774 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); | 778 | IInventoryAccessModule invAccess = RequestModuleInterface<IInventoryAccessModule>(); |
775 | if (invAccess != null) | 779 | if (invAccess != null) |
@@ -1251,9 +1255,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1251 | agentItem.CurrentPermissions = agentItem.BasePermissions; | 1255 | agentItem.CurrentPermissions = agentItem.BasePermissions; |
1252 | 1256 | ||
1253 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 1257 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
1258 | agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); | ||
1254 | agentItem.NextPermissions = taskItem.NextPermissions; | 1259 | agentItem.NextPermissions = taskItem.NextPermissions; |
1255 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | 1260 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
1256 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; | 1261 | // Group permissions make no sense here |
1262 | agentItem.GroupPermissions = 0; | ||
1257 | } | 1263 | } |
1258 | else | 1264 | else |
1259 | { | 1265 | { |
@@ -1261,7 +1267,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1261 | agentItem.CurrentPermissions = taskItem.CurrentPermissions; | 1267 | agentItem.CurrentPermissions = taskItem.CurrentPermissions; |
1262 | agentItem.NextPermissions = taskItem.NextPermissions; | 1268 | agentItem.NextPermissions = taskItem.NextPermissions; |
1263 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions; | 1269 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions; |
1264 | agentItem.GroupPermissions = taskItem.GroupPermissions; | 1270 | agentItem.GroupPermissions = 0; |
1265 | } | 1271 | } |
1266 | 1272 | ||
1267 | message = null; | 1273 | message = null; |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b97cceb..99be06b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -5242,6 +5242,7 @@ SendFullUpdateToClient(remoteClient, Position) ignores position parameter | |||
5242 | BaseMask &= NextOwnerMask | (uint)PermissionMask.Export; | 5242 | BaseMask &= NextOwnerMask | (uint)PermissionMask.Export; |
5243 | OwnerMask &= NextOwnerMask; | 5243 | OwnerMask &= NextOwnerMask; |
5244 | EveryoneMask &= NextOwnerMask | (uint)PermissionMask.Export; | 5244 | EveryoneMask &= NextOwnerMask | (uint)PermissionMask.Export; |
5245 | GroupMask = 0; // Giving an object zaps group permissions | ||
5245 | 5246 | ||
5246 | Inventory.ApplyNextOwnerPermissions(); | 5247 | Inventory.ApplyNextOwnerPermissions(); |
5247 | } | 5248 | } |