diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 64bdc99..9278164 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -385,9 +385,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
385 | if (Permissions.PropagatePermissions() && recipient != senderId) | 385 | if (Permissions.PropagatePermissions() && recipient != senderId) |
386 | { | 386 | { |
387 | // First, make sore base is limited to the next perms | 387 | // First, make sore base is limited to the next perms |
388 | itemCopy.BasePermissions = item.BasePermissions & item.NextPermissions; | 388 | itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move); |
389 | // By default, current equals base | 389 | // By default, current equals base |
390 | itemCopy.CurrentPermissions = itemCopy.BasePermissions; | 390 | itemCopy.CurrentPermissions = itemCopy.BasePermissions & item.CurrentPermissions; |
391 | 391 | ||
392 | // If this is an object, replace current perms | 392 | // If this is an object, replace current perms |
393 | // with folded perms | 393 | // with folded perms |
@@ -398,7 +398,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
398 | } | 398 | } |
399 | 399 | ||
400 | // Ensure there is no escalation | 400 | // Ensure there is no escalation |
401 | itemCopy.CurrentPermissions &= item.NextPermissions; | 401 | itemCopy.CurrentPermissions &= (item.NextPermissions | (uint)PermissionMask.Move); |
402 | 402 | ||
403 | // Need slam bit on xfer | 403 | // Need slam bit on xfer |
404 | itemCopy.CurrentPermissions |= 8; | 404 | itemCopy.CurrentPermissions |= 8; |
@@ -897,14 +897,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
897 | 897 | ||
898 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) | 898 | if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) |
899 | { | 899 | { |
900 | agentItem.BasePermissions = taskItem.BasePermissions & taskItem.NextPermissions; | 900 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
901 | if (taskItem.InvType == (int)InventoryType.Object) | 901 | if (taskItem.InvType == (int)InventoryType.Object) |
902 | agentItem.CurrentPermissions = agentItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13); | 902 | agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); |
903 | agentItem.CurrentPermissions = agentItem.BasePermissions ; | 903 | else |
904 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | ||
904 | 905 | ||
905 | agentItem.CurrentPermissions |= 8; | 906 | agentItem.CurrentPermissions |= 8; |
906 | agentItem.NextPermissions = taskItem.NextPermissions; | 907 | agentItem.NextPermissions = taskItem.NextPermissions; |
907 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions; | 908 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
908 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; | 909 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; |
909 | } | 910 | } |
910 | else | 911 | else |
@@ -1086,13 +1087,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1086 | if (Permissions.PropagatePermissions()) | 1087 | if (Permissions.PropagatePermissions()) |
1087 | { | 1088 | { |
1088 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & | 1089 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & |
1089 | srcTaskItem.NextPermissions; | 1090 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1090 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & | 1091 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & |
1091 | srcTaskItem.NextPermissions; | 1092 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1092 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & | 1093 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & |
1093 | srcTaskItem.NextPermissions; | 1094 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1094 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & | 1095 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & |
1095 | srcTaskItem.NextPermissions; | 1096 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1096 | destTaskItem.CurrentPermissions |= 8; // Slam! | 1097 | destTaskItem.CurrentPermissions |= 8; // Slam! |
1097 | } | 1098 | } |
1098 | } | 1099 | } |