aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs37
3 files changed, 33 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 88f0cb4..8b94100 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -769,7 +769,7 @@ namespace OpenSim.Region.Environment.Scenes
769 { 769 {
770 if (XferManager != null) 770 if (XferManager != null)
771 { 771 {
772 group.RequestInventoryFile(primLocalID, XferManager); 772 group.RequestInventoryFile(remoteClient, primLocalID, XferManager);
773 } 773 }
774 } 774 }
775 } 775 }
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index c26ff51..d35765c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -157,12 +157,12 @@ namespace OpenSim.Region.Environment.Scenes
157 /// </summary> 157 /// </summary>
158 /// <param name="localID"></param> 158 /// <param name="localID"></param>
159 /// <param name="xferManager"></param> 159 /// <param name="xferManager"></param>
160 public void RequestInventoryFile(uint localID, IXfer xferManager) 160 public void RequestInventoryFile(IClientAPI client, uint localID, IXfer xferManager)
161 { 161 {
162 SceneObjectPart part = GetChildPart(localID); 162 SceneObjectPart part = GetChildPart(localID);
163 if (part != null) 163 if (part != null)
164 { 164 {
165 part.RequestInventoryFile(xferManager); 165 part.RequestInventoryFile(client, xferManager);
166 } 166 }
167 else 167 else
168 { 168 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index a9dc9cf..8c5737c 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -484,7 +484,7 @@ namespace OpenSim.Region.Environment.Scenes
484 /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client 484 /// Serialize all the metadata for the items in this prim's inventory ready for sending to the client
485 /// </summary> 485 /// </summary>
486 /// <param name="xferManager"></param> 486 /// <param name="xferManager"></param>
487 public void RequestInventoryFile(IXfer xferManager) 487 public void RequestInventoryFile(IClientAPI client, IXfer xferManager)
488 { 488 {
489 byte[] fileData = new byte[0]; 489 byte[] fileData = new byte[0];
490 490
@@ -497,23 +497,45 @@ namespace OpenSim.Region.Environment.Scenes
497 { 497 {
498 foreach (TaskInventoryItem item in m_taskInventory.Values) 498 foreach (TaskInventoryItem item in m_taskInventory.Values)
499 { 499 {
500 LLUUID ownerID=item.OwnerID;
501 uint everyoneMask=0;
502 uint baseMask=item.BaseMask;
503 uint ownerMask=item.OwnerMask;
504
505 if(item.InvType == 10) // Script
506 {
507 if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanViewScript(item.ItemID, UUID, client.AgentId))
508 {
509 ownerID=client.AgentId;
510 baseMask=0x7fffffff;
511 ownerMask=0x7fffffff;
512 everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer);
513 }
514 if((item.OwnerID != client.AgentId) && m_parentGroup.Scene.ExternalChecks.ExternalChecksCanEditScript(item.ItemID, UUID, client.AgentId))
515 {
516 ownerID=client.AgentId;
517 baseMask=0x7fffffff;
518 ownerMask=0x7fffffff;
519 everyoneMask=(uint)(PermissionMask.Move | PermissionMask.Transfer | PermissionMask.Modify);
520 }
521 }
522
500 invString.AddItemStart(); 523 invString.AddItemStart();
501 invString.AddNameValueLine("item_id", item.ItemID.ToString()); 524 invString.AddNameValueLine("item_id", item.ItemID.ToString());
502 invString.AddNameValueLine("parent_id", UUID.ToString()); 525 invString.AddNameValueLine("parent_id", UUID.ToString());
503 526
504 invString.AddPermissionsStart(); 527 invString.AddPermissionsStart();
505 528
506 invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(item.BaseMask)); 529 invString.AddNameValueLine("base_mask", Helpers.UIntToHexString(baseMask));
507 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(item.OwnerMask)); 530 invString.AddNameValueLine("owner_mask", Helpers.UIntToHexString(ownerMask));
508 invString.AddNameValueLine("group_mask", "00000000"); 531 invString.AddNameValueLine("group_mask", Helpers.UIntToHexString(0));
509 invString.AddNameValueLine("everyone_mask", "00000000"); 532 invString.AddNameValueLine("everyone_mask", Helpers.UIntToHexString(everyoneMask));
510 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask)); 533 invString.AddNameValueLine("next_owner_mask", Helpers.UIntToHexString(item.NextOwnerMask));
511 534
512 invString.AddNameValueLine("creator_id", item.CreatorID.ToString()); 535 invString.AddNameValueLine("creator_id", item.CreatorID.ToString());
513 invString.AddNameValueLine("owner_id", item.OwnerID.ToString()); 536 invString.AddNameValueLine("owner_id", ownerID.ToString());
514 537
515 invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString()); 538 invString.AddNameValueLine("last_owner_id", item.LastOwnerID.ToString());
516// invString.AddNameValueLine("last_owner_id", item.OwnerID.ToString());
517 539
518 invString.AddNameValueLine("group_id", item.GroupID.ToString()); 540 invString.AddNameValueLine("group_id", item.GroupID.ToString());
519 invString.AddSectionEnd(); 541 invString.AddSectionEnd();
@@ -538,6 +560,7 @@ namespace OpenSim.Region.Environment.Scenes
538 560
539 fileData = Helpers.StringToField(invString.BuildString); 561 fileData = Helpers.StringToField(invString.BuildString);
540 562
563 //Console.WriteLine(Helpers.FieldToUTF8String(fileData));
541 //m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Helpers.FieldToUTF8String(fileData)); 564 //m_log.Debug("[PRIM INVENTORY]: RequestInventoryFile fileData: " + Helpers.FieldToUTF8String(fileData));
542 565
543 if (fileData.Length > 2) 566 if (fileData.Length > 2)