aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-16 14:55:54 +0000
committerMelanie Thielker2017-01-16 14:55:54 +0000
commitd78f04b3265911ea79aa0d0b1ab84ab01c3de049 (patch)
tree9def294da5de817adde32cb9cdc06c216496efe9 /OpenSim/Region
parentadd code for fixing effective permitions. This is a test, and currently too s... (diff)
parentRemove the last instance of the legacy slam but being set (diff)
downloadopensim-SC-d78f04b3265911ea79aa0d0b1ab84ab01c3de049.zip
opensim-SC-d78f04b3265911ea79aa0d0b1ab84ab01c3de049.tar.gz
opensim-SC-d78f04b3265911ea79aa0d0b1ab84ab01c3de049.tar.bz2
opensim-SC-d78f04b3265911ea79aa0d0b1ab84ab01c3de049.tar.xz
Merge branch 'melanie'
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs6
3 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 6fe7e89..b37744d 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -608,7 +608,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
608 608
609// item.BasePermissions = perms & so.RootPart.NextOwnerMask; 609// item.BasePermissions = perms & so.RootPart.NextOwnerMask;
610 610
611 uint nextp = so.RootPart.NextOwnerMask | 0x0f; 611 uint nextp = so.RootPart.NextOwnerMask | (uint)PermissionMask.FoldedMask;
612 item.BasePermissions = perms & nextp; 612 item.BasePermissions = perms & nextp;
613 item.CurrentPermissions = item.BasePermissions; 613 item.CurrentPermissions = item.BasePermissions;
614 item.NextPermissions = perms & so.RootPart.NextOwnerMask; 614 item.NextPermissions = perms & so.RootPart.NextOwnerMask;
@@ -616,7 +616,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask; 616 item.GroupPermissions = so.RootPart.GroupMask & so.RootPart.NextOwnerMask;
617 617
618 // apply next owner perms on rez 618 // apply next owner perms on rez
619 item.CurrentPermissions |= (uint)PermissionMask.Slam; 619 item.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
620 } 620 }
621 else 621 else
622 { 622 {
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 0d09cef..c1faf21 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1258,6 +1258,10 @@ namespace OpenSim.Region.Framework.Scenes
1258 agentItem.InvType = taskItem.InvType; 1258 agentItem.InvType = taskItem.InvType;
1259 agentItem.Flags = taskItem.Flags; 1259 agentItem.Flags = taskItem.Flags;
1260 1260
1261 // The code below isn't OK. It doesn't account for flags being changed
1262 // in the object inventory, so it will break when you do it. That
1263 // is the previous behaviour, so no matter at this moment. However, there is a lot
1264 // TODO: Fix this after the inventory fixer exists and has beenr run
1261 if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions()) 1265 if ((part.OwnerID != destAgent) && Permissions.PropagatePermissions())
1262 { 1266 {
1263 agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move); 1267 agentItem.BasePermissions = taskItem.BasePermissions & (taskItem.NextPermissions | (uint)PermissionMask.Move);
@@ -1266,7 +1270,7 @@ namespace OpenSim.Region.Framework.Scenes
1266 else 1270 else
1267 agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions; 1271 agentItem.CurrentPermissions = agentItem.BasePermissions & taskItem.CurrentPermissions;
1268 1272
1269 agentItem.CurrentPermissions = agentItem.BasePermissions; 1273 agentItem.BasePermissions = agentItem.CurrentPermissions;
1270 1274
1271 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm; 1275 agentItem.Flags |= (uint)InventoryItemFlags.ObjectSlamPerm;
1272 agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner); 1276 agentItem.Flags &= ~(uint)(InventoryItemFlags.ObjectOverwriteBase | InventoryItemFlags.ObjectOverwriteOwner | InventoryItemFlags.ObjectOverwriteGroup | InventoryItemFlags.ObjectOverwriteEveryone | InventoryItemFlags.ObjectOverwriteNextOwner);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 48ae39e..636afac 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -943,8 +943,7 @@ namespace OpenSim.Region.Framework.Scenes
943 943
944 group.SetGroup(m_part.GroupID, null); 944 group.SetGroup(m_part.GroupID, null);
945 945
946 // TODO: Remove magic number badness 946 if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
947 if ((rootPart.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number
948 { 947 {
949 if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions()) 948 if (m_part.ParentGroup.Scene.Permissions.PropagatePermissions())
950 { 949 {
@@ -964,8 +963,7 @@ namespace OpenSim.Region.Framework.Scenes
964 963
965 foreach (SceneObjectPart part in partList) 964 foreach (SceneObjectPart part in partList)
966 { 965 {
967 // TODO: Remove magic number badness 966 if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0)
968 if ((part.OwnerID != item.OwnerID) || (item.CurrentPermissions & (uint)PermissionMask.Slam) != 0 || (item.Flags & (uint)InventoryItemFlags.ObjectSlamPerm) != 0) // Magic number
969 { 967 {
970 part.LastOwnerID = part.OwnerID; 968 part.LastOwnerID = part.OwnerID;
971 part.OwnerID = item.OwnerID; 969 part.OwnerID = item.OwnerID;