Fix taking or returning locked objects losing permissions for owner
parent
a4ec97cfdd
commit
efc6c6db7c
|
@ -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())
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue