diff options
Diffstat (limited to '')
3 files changed, 18 insertions, 22 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index d4f9c16..a32d7dc 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -597,10 +597,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
597 | basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms); | 597 | basePerms = PermissionsUtil.FixAndFoldPermissions(basePerms); |
598 | 598 | ||
599 | item.BasePermissions = basePerms; | 599 | item.BasePermissions = basePerms; |
600 | item.CurrentPermissions = item.BasePermissions; | 600 | item.CurrentPermissions = basePerms; |
601 | item.NextPermissions = effectivePerms & so.RootPart.NextOwnerMask; | 601 | item.NextPermissions = basePerms & so.RootPart.NextOwnerMask; |
602 | item.EveryOnePermissions = so.RootPart.EveryoneMask & so.RootPart.NextOwnerMask; | 602 | item.EveryOnePermissions = basePerms & so.RootPart.EveryoneMask; |
603 | item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; | 603 | item.GroupPermissions = basePerms & so.RootPart.GroupMask; |
604 | 604 | ||
605 | // apply next owner perms on rez | 605 | // apply next owner perms on rez |
606 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 606 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index ca392b8..6854b53 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | |||
@@ -216,12 +216,10 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
216 | 216 | ||
217 | item.BasePermissions = perms; | 217 | item.BasePermissions = perms; |
218 | item.CurrentPermissions = perms; | 218 | item.CurrentPermissions = perms; |
219 | 219 | item.NextPermissions = part.NextOwnerMask & perms; | |
220 | perms &= part.NextOwnerMask; | ||
221 | item.NextPermissions = perms; | ||
222 | |||
223 | item.EveryOnePermissions = part.EveryoneMask & perms; | 220 | item.EveryOnePermissions = part.EveryoneMask & perms; |
224 | item.GroupPermissions = part.GroupMask & perms; | 221 | item.GroupPermissions = part.GroupMask & perms; |
222 | |||
225 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 223 | item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
226 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 224 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
227 | 225 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 0549571..a2cee81 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1267,29 +1267,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
1267 | // TODO: Fix this after the inventory fixer exists and has beenr run | 1267 | // TODO: Fix this after the inventory fixer exists and has beenr run |
1268 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) | 1268 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) |
1269 | { | 1269 | { |
1270 | agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions; | 1270 | uint perms = taskItem.BasePermissions & taskItem.NextPermissions; |
1271 | if (taskItem.InvType == (int)InventoryType.Object) | 1271 | if (taskItem.InvType == (int)InventoryType.Object) |
1272 | { | 1272 | { |
1273 | uint perms = agentItem.BasePermissions; | 1273 | PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms ); |
1274 | PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms ); | 1274 | perms = PermissionsUtil.FixAndFoldPermissions(perms); |
1275 | // perms |= (uint)PermissionMask.Move; | ||
1276 | // agentItem.BasePermissions = perms; | ||
1277 | agentItem.BasePermissions = PermissionsUtil.FixAndFoldPermissions(perms); | ||
1278 | } | 1275 | } |
1279 | else | 1276 | else |
1280 | agentItem.BasePermissions &= taskItem.CurrentPermissions; | 1277 | perms &= taskItem.CurrentPermissions; |
1281 | 1278 | ||
1282 | // always unlock | 1279 | // always unlock |
1283 | agentItem.BasePermissions |= (uint)PermissionMask.Move; | 1280 | perms |= (uint)PermissionMask.Move; |
1284 | 1281 | ||
1285 | agentItem.CurrentPermissions = agentItem.BasePermissions; | 1282 | agentItem.BasePermissions = perms; |
1286 | 1283 | agentItem.CurrentPermissions = perms; | |
1287 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 1284 | agentItem.NextPermissions = perms & taskItem.NextPermissions; |
1288 | agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); | 1285 | agentItem.EveryOnePermissions = perms & taskItem.EveryonePermissions; |
1289 | agentItem.NextPermissions = taskItem.NextPermissions; | ||
1290 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | ||
1291 | // Group permissions make no sense here | 1286 | // Group permissions make no sense here |
1292 | agentItem.GroupPermissions = 0; | 1287 | agentItem.GroupPermissions = 0; |
1288 | |||
1289 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | ||
1290 | agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); | ||
1293 | } | 1291 | } |
1294 | else | 1292 | else |
1295 | { | 1293 | { |