Mantis#1677. Thank you, Melanie for a patch that:
Patch propagates the permissionToTake flag into the timer handler, so that "take copy" and delete permissions are honored.0.6.0-stable
parent
d470d30c09
commit
18c8bf99a4
|
@ -46,6 +46,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public IClientAPI remoteClient;
|
public IClientAPI remoteClient;
|
||||||
public SceneObjectGroup objectGroup;
|
public SceneObjectGroup objectGroup;
|
||||||
public LLUUID folderID;
|
public LLUUID folderID;
|
||||||
|
public bool permissionToDelete;
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class Scene
|
public partial class Scene
|
||||||
|
@ -1505,6 +1506,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
dtis.objectGroup = objectGroup;
|
dtis.objectGroup = objectGroup;
|
||||||
dtis.remoteClient = remoteClient;
|
dtis.remoteClient = remoteClient;
|
||||||
dtis.selectedEnt = selectedEnt;
|
dtis.selectedEnt = selectedEnt;
|
||||||
|
dtis.permissionToDelete = permissionToDelete;
|
||||||
|
|
||||||
m_inventoryDeletes.Enqueue(dtis);
|
m_inventoryDeletes.Enqueue(dtis);
|
||||||
}
|
}
|
||||||
|
@ -1512,6 +1514,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_inventoryTicker.Start();
|
m_inventoryTicker.Start();
|
||||||
|
|
||||||
// Visually remove it, even if it isnt really gone yet.
|
// Visually remove it, even if it isnt really gone yet.
|
||||||
|
if (permissionToDelete)
|
||||||
objectGroup.FakeDeleteGroup();
|
objectGroup.FakeDeleteGroup();
|
||||||
}
|
}
|
||||||
else if (permissionToDelete)
|
else if (permissionToDelete)
|
||||||
|
@ -1543,7 +1546,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
m_log.InfoFormat("Sending deleted object to user's inventory, {0} item(s) remaining.", left);
|
m_log.InfoFormat("Sending deleted object to user's inventory, {0} item(s) remaining.", left);
|
||||||
x = m_inventoryDeletes.Dequeue();
|
x = m_inventoryDeletes.Dequeue();
|
||||||
DeleteToInventory(x.DeRezPacket, x.selectedEnt, x.remoteClient, x.objectGroup, x.folderID);
|
DeleteToInventory(x.DeRezPacket, x.selectedEnt, x.remoteClient, x.objectGroup, x.folderID, x.permissionToDelete);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1556,7 +1559,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeleteToInventory(DeRezObjectPacket DeRezPacket, EntityBase selectedEnt, IClientAPI remoteClient, SceneObjectGroup objectGroup, LLUUID folderID)
|
private void DeleteToInventory(DeRezObjectPacket DeRezPacket, EntityBase selectedEnt, IClientAPI remoteClient, SceneObjectGroup objectGroup, LLUUID folderID, bool permissionToDelete)
|
||||||
{
|
{
|
||||||
string sceneObjectXml = objectGroup.ToXmlString();
|
string sceneObjectXml = objectGroup.ToXmlString();
|
||||||
|
|
||||||
|
@ -1662,6 +1665,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
// Finally remove the item, for reals this time.
|
// Finally remove the item, for reals this time.
|
||||||
|
if(permissionToDelete)
|
||||||
DeleteSceneObject(objectGroup);
|
DeleteSceneObject(objectGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue