Only perform the take object permissions check if an object is being attached directly from the scene, not from existing inventory

viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2010-11-23 04:26:07 +00:00
parent bbc291dfdf
commit 63170fdea7
1 changed files with 50 additions and 55 deletions

View File

@ -111,7 +111,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
return;
if (!m_scene.Permissions.CanTakeObject(part.UUID, remoteClient.AgentId))
{
remoteClient.SendAgentAlertMessage(
"You don't have sufficient permissions to attach this object", false);
return;
}
// TODO: this short circuits multiple attachments functionality in LL viewer 2.1+ and should
// be removed when that functionality is implemented in opensim
@ -141,8 +146,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{
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
// be removed when that functionality is implemented in opensim
AttachmentPt &= 0x7f;
@ -202,14 +205,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group);
AttachToAgent(sp, group, AttachmentPt, attachPos, silent);
}
else
{
remoteClient.SendAgentAlertMessage(
"You don't have sufficient permissions to attach this object", false);
return false;
}
return true;
}