diff options
author | Oren Hurvitz | 2014-05-25 11:47:04 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-05-25 15:35:00 +0100 |
commit | e68867c9b6efd72a72d158deab16484b37faab46 (patch) | |
tree | 58b364cffcdd0d9339f24359dadbde1e5335d05b /OpenSim/Region | |
parent | When creating a new user, create the folders "Current Outfit", "Favorites", a... (diff) | |
download | opensim-SC-e68867c9b6efd72a72d158deab16484b37faab46.zip opensim-SC-e68867c9b6efd72a72d158deab16484b37faab46.tar.gz opensim-SC-e68867c9b6efd72a72d158deab16484b37faab46.tar.bz2 opensim-SC-e68867c9b6efd72a72d158deab16484b37faab46.tar.xz |
When taking an object into inventory, set the inventory item's "Next Owner" permissions according to the permissions of the items in the object
Diffstat (limited to 'OpenSim/Region')
-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; |