Fix taking or returning locked objects losing permissions for owner

avinationmerge
Melanie 2011-11-12 12:09:28 +01:00
parent a4ec97cfdd
commit efc6c6db7c
2 changed files with 10 additions and 2 deletions

View File

@ -477,7 +477,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{ {
uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move) | 7; uint effectivePerms = (uint)(PermissionMask.Copy | PermissionMask.Transfer | PermissionMask.Modify | PermissionMask.Move) | 7;
foreach (SceneObjectGroup grp in objsForEffectivePermissions) foreach (SceneObjectGroup grp in objsForEffectivePermissions)
effectivePerms &= grp.GetEffectivePermissions(); effectivePerms &= grp.GetEffectivePermissions(true);
effectivePerms |= (uint)PermissionMask.Move; effectivePerms |= (uint)PermissionMask.Move;
if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions()) if (remoteClient != null && (remoteClient.AgentId != so.RootPart.OwnerID) && m_Scene.Permissions.PropagatePermissions())

View File

@ -229,6 +229,11 @@ namespace OpenSim.Region.Framework.Scenes
} }
public uint GetEffectivePermissions() public uint GetEffectivePermissions()
{
return GetEffectivePermissions(false);
}
public uint GetEffectivePermissions(bool useBase)
{ {
uint perms=(uint)(PermissionMask.Modify | uint perms=(uint)(PermissionMask.Modify |
PermissionMask.Copy | PermissionMask.Copy |
@ -241,6 +246,9 @@ namespace OpenSim.Region.Framework.Scenes
for (int i = 0; i < parts.Length; i++) for (int i = 0; i < parts.Length; i++)
{ {
SceneObjectPart part = parts[i]; SceneObjectPart part = parts[i];
if (useBase)
ownerMask &= part.BaseMask;
else
ownerMask &= part.OwnerMask; ownerMask &= part.OwnerMask;
perms &= part.Inventory.MaskEffectivePermissions(); perms &= part.Inventory.MaskEffectivePermissions();
} }