diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index c4a42bc..b4771fd 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -556,6 +556,9 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
556 | 556 | ||
557 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) | 557 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) |
558 | { | 558 | { |
559 | // Changing ownership, so apply the "Next Owner" permissions to all of the | ||
560 | // inventory item's permissions. | ||
561 | |||
559 | uint perms = effectivePerms; | 562 | uint perms = effectivePerms; |
560 | PermissionsUtil.ApplyFoldedPermissions(effectivePerms, ref perms); | 563 | PermissionsUtil.ApplyFoldedPermissions(effectivePerms, ref perms); |
561 | 564 | ||
@@ -570,6 +573,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
570 | } | 573 | } |
571 | else | 574 | else |
572 | { | 575 | { |
576 | // Not changing ownership. | ||
577 | // In this case we apply the permissions in the object's items ONLY to the inventory | ||
578 | // item's "Next Owner" permissions, but NOT to its "Current", "Base", etc. permissions. | ||
579 | // E.g., if the object contains a No-Transfer item then the item's "Next Owner" | ||
580 | // permissions are also No-Transfer. | ||
581 | PermissionsUtil.ApplyFoldedPermissions(effectivePerms, ref allObjectsNextOwnerPerms); | ||
582 | |||
573 | item.BasePermissions = effectivePerms; | 583 | item.BasePermissions = effectivePerms; |
574 | item.CurrentPermissions = effectivePerms; | 584 | item.CurrentPermissions = effectivePerms; |
575 | item.NextPermissions = allObjectsNextOwnerPerms & effectivePerms; | 585 | item.NextPermissions = allObjectsNextOwnerPerms & effectivePerms; |