diff options
author | Melanie | 2011-11-12 12:09:28 +0100 |
---|---|---|
committer | Melanie | 2011-11-12 12:09:28 +0100 |
commit | efc6c6db7ce3602660c566f4beaf529d5ea9ec71 (patch) | |
tree | 27263fd71b6f03292bb369a19bab77ad6dfea3d8 | |
parent | Merge branch 'master' into bigmerge (diff) | |
download | opensim-SC-efc6c6db7ce3602660c566f4beaf529d5ea9ec71.zip opensim-SC-efc6c6db7ce3602660c566f4beaf529d5ea9ec71.tar.gz opensim-SC-efc6c6db7ce3602660c566f4beaf529d5ea9ec71.tar.bz2 opensim-SC-efc6c6db7ce3602660c566f4beaf529d5ea9ec71.tar.xz |
Fix taking or returning locked objects losing permissions for owner
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index e0f8240..12555b7 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -477,7 +477,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
477 | { | 477 | { |
478 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move) | 7; | 478 | uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move) | 7; |
479 | foreach (SceneObjectGroup grp in objsForEffectivePermissions) | 479 | foreach (SceneObjectGroup grp in objsForEffectivePermissions) |
480 | effectivePerms &= grp.GetEffectivePermissions(); | 480 | effectivePerms &= grp.GetEffectivePermissions(true); |
481 | effectivePerms |= (uint)PermissionMask.Move; | 481 | effectivePerms |= (uint)PermissionMask.Move; |
482 | 482 | ||
483 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) | 483 | if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 6bd9183..c7da4f4 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -230,6 +230,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
230 | 230 | ||
231 | public uint GetEffectivePermissions() | 231 | public uint GetEffectivePermissions() |
232 | { | 232 | { |
233 | return GetEffectivePermissions(false); | ||
234 | } | ||
235 | |||
236 | public uint GetEffectivePermissions(bool useBase) | ||
237 | { | ||
233 | uint perms=(uint)(PermissionMask.Modify | | 238 | uint perms=(uint)(PermissionMask.Modify | |
234 | PermissionMask.Copy | | 239 | PermissionMask.Copy | |
235 | PermissionMask.Move | | 240 | PermissionMask.Move | |
@@ -241,7 +246,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
241 | for (int i = 0; i < parts.Length; i++) | 246 | for (int i = 0; i < parts.Length; i++) |
242 | { | 247 | { |
243 | SceneObjectPart part = parts[i]; | 248 | SceneObjectPart part = parts[i]; |
244 | ownerMask &= part.OwnerMask; | 249 | if (useBase) |
250 | ownerMask &= part.BaseMask; | ||
251 | else | ||
252 | ownerMask &= part.OwnerMask; | ||
245 | perms &= part.Inventory.MaskEffectivePermissions(); | 253 | perms &= part.Inventory.MaskEffectivePermissions(); |
246 | } | 254 | } |
247 | 255 | ||