Only perform the take object permissions check if an object is being attached directly from the scene, not from existing inventory
parent
bbc291dfdf
commit
63170fdea7
|
@ -111,7 +111,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!m_scene.Permissions.CanTakeObject(part.UUID, remoteClient.AgentId))
|
if (!m_scene.Permissions.CanTakeObject(part.UUID, remoteClient.AgentId))
|
||||||
|
{
|
||||||
|
remoteClient.SendAgentAlertMessage(
|
||||||
|
"You don't have sufficient permissions to attach this object", false);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
|
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
|
||||||
// be removed when that functionality is implemented in opensim
|
// be removed when that functionality is implemented in opensim
|
||||||
|
@ -141,8 +146,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
{
|
{
|
||||||
Vector3 attachPos = group.AbsolutePosition;
|
Vector3 attachPos = group.AbsolutePosition;
|
||||||
|
|
||||||
if (m_scene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
|
|
||||||
{
|
|
||||||
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
|
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
|
||||||
// be removed when that functionality is implemented in opensim
|
// be removed when that functionality is implemented in opensim
|
||||||
AttachmentPt &= 0x7f;
|
AttachmentPt &= 0x7f;
|
||||||
|
@ -202,14 +205,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group);
|
ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group);
|
||||||
|
|
||||||
AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
|
AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
remoteClient.SendAgentAlertMessage(
|
|
||||||
"You don't have sufficient permissions to attach this object", false);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue