diff options
author | Melanie | 2010-06-27 20:20:08 +0100 |
---|---|---|
committer | Melanie | 2010-06-27 20:20:08 +0100 |
commit | 9c553cd254b5b27f3ddcffddee9684aeb4a6298b (patch) | |
tree | 69feb70ea3f3eecb3a977812d00addf36d36bd9a /OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |
parent | Merge branch 'master' into careminster-presence-refactor (diff) | |
download | opensim-SC-9c553cd254b5b27f3ddcffddee9684aeb4a6298b.zip opensim-SC-9c553cd254b5b27f3ddcffddee9684aeb4a6298b.tar.gz opensim-SC-9c553cd254b5b27f3ddcffddee9684aeb4a6298b.tar.bz2 opensim-SC-9c553cd254b5b27f3ddcffddee9684aeb4a6298b.tar.xz |
Fix more perms weirdness. Preserve "Locked" status across gives and rez/take.
Preserve "Anyone can move" flag in most cases.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 55c1575..6532537 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -402,7 +402,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
402 | // First, make sore base is limited to the next perms | 402 | // First, make sore base is limited to the next perms |
403 | itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move); | 403 | itemCopy.BasePermissions = item.BasePermissions & (item.NextPermissions | (uint)PermissionMask.Move); |
404 | // By default, current equals base | 404 | // By default, current equals base |
405 | itemCopy.CurrentPermissions = itemCopy.BasePermissions; | 405 | itemCopy.CurrentPermissions = itemCopy.BasePermissions & item.CurrentPermissions; |
406 | 406 | ||
407 | // If this is an object, replace current perms | 407 | // If this is an object, replace current perms |
408 | // with folded perms | 408 | // with folded perms |
@@ -413,7 +413,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
413 | } | 413 | } |
414 | 414 | ||
415 | // Ensure there is no escalation | 415 | // Ensure there is no escalation |
416 | itemCopy.CurrentPermissions &= item.NextPermissions; | 416 | itemCopy.CurrentPermissions &= (item.NextPermissions | (uint)PermissionMask.Move); |
417 | 417 | ||
418 | // Need slam bit on xfer | 418 | // Need slam bit on xfer |
419 | itemCopy.CurrentPermissions |= 8; | 419 | itemCopy.CurrentPermissions |= 8; |
@@ -918,12 +918,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
918 | { | 918 | { |
919 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); | 919 | agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
920 | if (taskItem.InvType == (int)InventoryType.Object) | 920 | if (taskItem.InvType == (int)InventoryType.Object) |
921 | agentItem.CurrentPermissions = agentItem.BasePermissions & ((taskItem.CurrentPermissions & 7) << 13); | 921 | agentItem.CurrentPermissions = agentItem.BasePermissions & (((taskItem.CurrentPermissions & 7) << 13) | (taskItem.CurrentPermissions & (uint)PermissionMask.Move)); |
922 | agentItem.CurrentPermissions = agentItem.BasePermissions ; | 922 | else |
923 | agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; | ||
923 | 924 | ||
924 | agentItem.CurrentPermissions |= 8; | 925 | agentItem.CurrentPermissions |= 8; |
925 | agentItem.NextPermissions = taskItem.NextPermissions; | 926 | agentItem.NextPermissions = taskItem.NextPermissions; |
926 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & taskItem.NextPermissions; | 927 | agentItem.EveryOnePermissions = taskItem.EveryonePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); |
927 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; | 928 | agentItem.GroupPermissions = taskItem.GroupPermissions & taskItem.NextPermissions; |
928 | } | 929 | } |
929 | else | 930 | else |
@@ -1105,11 +1106,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1105 | if (Permissions.PropagatePermissions()) | 1106 | if (Permissions.PropagatePermissions()) |
1106 | { | 1107 | { |
1107 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & | 1108 | destTaskItem.CurrentPermissions = srcTaskItem.CurrentPermissions & |
1108 | srcTaskItem.NextPermissions; | 1109 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1109 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & | 1110 | destTaskItem.GroupPermissions = srcTaskItem.GroupPermissions & |
1110 | srcTaskItem.NextPermissions; | 1111 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1111 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & | 1112 | destTaskItem.EveryonePermissions = srcTaskItem.EveryonePermissions & |
1112 | srcTaskItem.NextPermissions; | 1113 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1113 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & | 1114 | destTaskItem.BasePermissions = srcTaskItem.BasePermissions & |
1114 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); | 1115 | (srcTaskItem.NextPermissions | (uint)PermissionMask.Move); |
1115 | destTaskItem.CurrentPermissions |= 8; // Slam! | 1116 | destTaskItem.CurrentPermissions |= 8; // Slam! |