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/CoreModules/Framework/InventoryAccess | |
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/CoreModules/Framework/InventoryAccess')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index aa5d381..0104823 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -1141,6 +1141,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
1141 | part.OwnerID = item.Owner; | 1141 | part.OwnerID = item.Owner; |
1142 | part.RezzerID = item.Owner; | 1142 | part.RezzerID = item.Owner; |
1143 | part.Inventory.ChangeInventoryOwner(item.Owner); | 1143 | part.Inventory.ChangeInventoryOwner(item.Owner); |
1144 | |||
1145 | // This applies the base mask from the item as the next | ||
1146 | // permissions for the object. This is correct because the | ||
1147 | // giver's base mask was masked by the giver's next owner | ||
1148 | // mask, so the base mask equals the original next owner mask. | ||
1149 | part.NextOwnerMask = item.BasePermissions; | ||
1144 | } | 1150 | } |
1145 | 1151 | ||
1146 | so.ApplyNextOwnerPermissions(); | 1152 | so.ApplyNextOwnerPermissions(); |
@@ -1152,10 +1158,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
1152 | { | 1158 | { |
1153 | if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0) | 1159 | if ((item.Flags & (uint)InventoryItemFlags.ObjectHasMultipleItems) == 0) |
1154 | { | 1160 | { |
1155 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteEveryone) != 0) | 1161 | part.EveryoneMask = item.EveryOnePermissions & part.BaseMask; |
1156 | part.EveryoneMask = item.EveryOnePermissions & part.BaseMask; | 1162 | part.NextOwnerMask = item.NextPermissions & part.BaseMask; |
1157 | if ((item.Flags & (uint)InventoryItemFlags.ObjectOverwriteNextOwner) != 0) | ||
1158 | part.NextOwnerMask = item.NextPermissions & part.BaseMask; | ||
1159 | } | 1163 | } |
1160 | } | 1164 | } |
1161 | } | 1165 | } |