aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2019-02-15 01:10:56 +0000
committerUbitUmarov2019-02-15 01:10:56 +0000
commit06930a180360e4ec54d8bf44c80794edb0a5a17c (patch)
tree77ee30505ebe8682c077dc0fa02a37c3f00bd5fd /OpenSim/Region/CoreModules
parentmantis 8479: deep change DeRezObjects(..) doing independent permitions checks... (diff)
downloadopensim-SC-06930a180360e4ec54d8bf44c80794edb0a5a17c.zip
opensim-SC-06930a180360e4ec54d8bf44c80794edb0a5a17c.tar.gz
opensim-SC-06930a180360e4ec54d8bf44c80794edb0a5a17c.tar.bz2
opensim-SC-06930a180360e4ec54d8bf44c80794edb0a5a17c.tar.xz
don't break permitions on god object return or delete
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index d6c65a1..69c1e4e 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -526,16 +526,23 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
526 item.AssetType = (int)AssetType.Object; 526 item.AssetType = (int)AssetType.Object;
527 item.AssetID = asset.FullID; 527 item.AssetID = asset.FullID;
528 528
529 if (DeRezAction.SaveToExistingUserInventoryItem == action) 529 if (action == DeRezAction.SaveToExistingUserInventoryItem)
530 { 530 {
531 m_Scene.InventoryService.UpdateItem(item); 531 m_Scene.InventoryService.UpdateItem(item);
532 } 532 }
533 else 533 else
534 { 534 {
535 AddPermissions(item, objlist[0], objlist, remoteClient); 535 bool isowner = remoteClient != null && item.Owner == remoteClient.AgentId;
536 if(action == DeRezAction.Return)
537 AddPermissions(item, objlist[0], objlist, null);
538 else if(action == DeRezAction.Delete && !isowner)
539 AddPermissions(item, objlist[0], objlist, null);
540 else
541 AddPermissions(item, objlist[0], objlist, remoteClient);
542
536 m_Scene.AddInventoryItem(item); 543 m_Scene.AddInventoryItem(item);
537 544
538 if (remoteClient != null && item.Owner == remoteClient.AgentId) 545 if (isowner)
539 { 546 {
540 remoteClient.SendInventoryItemCreateUpdate(item, 0); 547 remoteClient.SendInventoryItemCreateUpdate(item, 0);
541 } 548 }
@@ -1010,7 +1017,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
1010 group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1); 1017 group.CreateScriptInstances(0, true, m_Scene.DefaultScriptEngine, 1);
1011 rootPart.ParentGroup.ResumeScripts(); 1018 rootPart.ParentGroup.ResumeScripts();
1012 1019
1013 group.ScheduleGroupForFullUpdate(); 1020 group.ScheduleGroupForFullAnimUpdate();
1014 } 1021 }
1015 else 1022 else
1016 m_Scene.AddNewSceneObject(group, true, false); 1023 m_Scene.AddNewSceneObject(group, true, false);