mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Fix:Cannot drag inventory from child prim into inventory http://opensimulator.org/mantis/view.php?id=5569
This commit is contained in:
@@ -1144,6 +1144,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
|
||||
UUID partUUID = part.UUID;
|
||||
SceneObjectGroup group = part.ParentGroup;
|
||||
if (group != null)
|
||||
partUUID = group.RootPart.UUID;
|
||||
|
||||
TaskInventoryItem taskItem = part.Inventory.GetInventoryItem(itemId);
|
||||
|
||||
if (null == taskItem)
|
||||
@@ -1155,19 +1160,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return;
|
||||
}
|
||||
|
||||
TaskInventoryItem item = part.Inventory.GetInventoryItem(itemId);
|
||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
if ((taskItem.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||
{
|
||||
// If the item to be moved is no copy, we need to be able to
|
||||
// edit the prim.
|
||||
if (!Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId))
|
||||
if (!Permissions.CanEditObjectInventory(partUUID, remoteClient.AgentId))
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the item is copiable, then we just need to have perms
|
||||
// on it. The delete check is a pure rights check
|
||||
if (!Permissions.CanDeleteObject(part.UUID, remoteClient.AgentId))
|
||||
if (!Permissions.CanDeleteObject(partUUID, remoteClient.AgentId))
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user