Merge branch 'master' into 0.7-post-fixes

0.7-release
Diva Canto 2010-06-29 14:25:13 -07:00
commit bfff39c4c0
2 changed files with 20 additions and 7 deletions

View File

@ -131,7 +131,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
return ret; return ret;
} }
public override UUID DeleteToInventory(DeRezAction action, UUID folderID, // DO NOT OVERRIDE THIS METHOD
public virtual UUID DeleteToInventory(DeRezAction action, UUID folderID,
SceneObjectGroup objectGroup, IClientAPI remoteClient) SceneObjectGroup objectGroup, IClientAPI remoteClient)
{ {
UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient); UUID assetID = base.DeleteToInventory(action, folderID, new List<SceneObjectGroup>() {objectGroup}, remoteClient);

View File

@ -1574,6 +1574,17 @@ namespace OpenSim.Region.Framework.Scenes
// for when deleting the object from it // for when deleting the object from it
ForceSceneObjectBackup(grp); ForceSceneObjectBackup(grp);
if (remoteClient == null)
{
// Autoreturn has a null client. Nothing else does. So
// allow only returns
if (action != DeRezAction.Return)
return;
permissionToTakeCopy = false;
}
else
{
if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId)) if (!Permissions.CanTakeCopyObject(grp.UUID, remoteClient.AgentId))
permissionToTakeCopy = false; permissionToTakeCopy = false;
if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId)) if (!Permissions.CanTakeObject(grp.UUID, remoteClient.AgentId))
@ -1581,6 +1592,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId)) if (!Permissions.CanDeleteObject(grp.UUID, remoteClient.AgentId))
permissionToDelete = false; permissionToDelete = false;
}
} }