diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index f384462..cba75f1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -664,17 +664,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
664 | // a mask | 664 | // a mask |
665 | if (item.InvType == (int)InventoryType.Object) | 665 | if (item.InvType == (int)InventoryType.Object) |
666 | { | 666 | { |
667 | // Create a safe mask for the current perms | ||
668 | uint foldedPerms = (item.CurrentPermissions & 7) << 13; | ||
669 | foldedPerms |= permsMask; | ||
670 | |||
671 | bool isRootMod = (item.CurrentPermissions & | 667 | bool isRootMod = (item.CurrentPermissions & |
672 | (uint)PermissionMask.Modify) != 0 ? | 668 | (uint)PermissionMask.Modify) != 0 ? |
673 | true : false; | 669 | true : false; |
674 | 670 | ||
675 | // Mask the owner perms to the folded perms | 671 | // Mask the owner perms to the folded perms |
676 | ownerPerms &= foldedPerms; | 672 | PermissionsUtil.ApplyFoldedPermissions(item.CurrentPermissions, ref ownerPerms); |
677 | basePerms &= foldedPerms; | 673 | PermissionsUtil.ApplyFoldedPermissions(item.CurrentPermissions, ref basePerms); |
678 | 674 | ||
679 | // If the root was mod, let the mask reflect that | 675 | // If the root was mod, let the mask reflect that |
680 | // We also need to adjust the base here, because | 676 | // We also need to adjust the base here, because |
@@ -1235,9 +1231,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1235 | { | 1231 | { |
1236 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | 1232 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
1237 | if (taskItem.InvType == (int)InventoryType.Object) | 1233 | if (taskItem.InvType == (int)InventoryType.Object) |
1238 | agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); | 1234 | { |
1235 | uint perms = taskItem.CurrentPermissions; | ||
1236 | PermissionsUtil.ApplyFoldedPermissions(taskItem.CurrentPermissions, ref perms); | ||
1237 | agentItem.BasePermissions = perms | (uint)PermissionMask.Move; | ||
1238 | agentItem.CurrentPermissions = agentItem.BasePermissions; | ||
1239 | } | ||
1239 | else | 1240 | else |
1241 | { | ||
1240 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | 1242 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; |
1243 | } | ||
1241 | 1244 | ||
1242 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; | 1245 | agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; |
1243 | agentItem.NextPermissions = taskItem.NextPermissions; | 1246 | agentItem.NextPermissions = taskItem.NextPermissions; |