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;
foreach (SceneObjectGroup grp in objsForEffectivePermissions)
effectivePerms &= grp.GetEffectivePermissions();
effectivePerms &= grp.GetEffectivePermissions(true);
effectivePerms |= (uint)PermissionMask.Move;
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()
{
return GetEffectivePermissions(false);
}
public uint GetEffectivePermissions(bool useBase)
{
uint perms=(uint)(PermissionMask.Modify |
PermissionMask.Copy |
@ -241,7 +246,10 @@ namespace OpenSim.Region.Framework.Scenes
for (int i = 0; i < parts.Length; i++)
{
SceneObjectPart part = parts[i];
ownerMask &= part.OwnerMask;
if (useBase)
ownerMask &= part.BaseMask;
else
ownerMask &= part.OwnerMask;
perms &= part.Inventory.MaskEffectivePermissions();
}