diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 26 |
1 files changed, 12 insertions, 14 deletions
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 | { |