aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-05 19:37:02 +0100
committerJustin Clark-Casey (justincc)2010-05-26 20:58:40 +0100
commit32c43bf59a3b9c3cb0b9eb1d52f664997e39a50d (patch)
tree235fa911ad8c2c00fbb5a95d15994631b1e197d4 /OpenSim/Region
parentbackport from master fix for attachment display (diff)
downloadopensim-SC-32c43bf59a3b9c3cb0b9eb1d52f664997e39a50d.zip
opensim-SC-32c43bf59a3b9c3cb0b9eb1d52f664997e39a50d.tar.gz
opensim-SC-32c43bf59a3b9c3cb0b9eb1d52f664997e39a50d.tar.bz2
opensim-SC-32c43bf59a3b9c3cb0b9eb1d52f664997e39a50d.tar.xz
Partially implement share with group option for object inventory items
If serverside permissions are off then this works as expected. Previously, it was impossible for more than one person to edit such items even if permissions were off. If serverside permissions are on then this works as expected if the object was created by an avatar who had the required group active. However, if the group for the object is later set then the contained item is still not editable. This may be linked to a wider bug where the object is still not modifiable by the group anyway Resolve conflict in LLClientView
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs1
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs10
4 files changed, 21 insertions, 7 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 724c8bc..bd0c146 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -657,8 +657,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
657 public void ProcessSpecificPacketAsync(object state) 657 public void ProcessSpecificPacketAsync(object state)
658 { 658 {
659 AsyncPacketProcess packetObject = (AsyncPacketProcess)state; 659 AsyncPacketProcess packetObject = (AsyncPacketProcess)state;
660 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack); 660 packetObject.result = packetObject.Method(packetObject.ClientView, packetObject.Pack);
661
662 } 661 }
663 662
664 #endregion Packet Handling 663 #endregion Packet Handling
@@ -7662,12 +7661,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7662 newTaskItem.GroupPermissions = updatetask.InventoryData.GroupMask; 7661 newTaskItem.GroupPermissions = updatetask.InventoryData.GroupMask;
7663 newTaskItem.EveryonePermissions = updatetask.InventoryData.EveryoneMask; 7662 newTaskItem.EveryonePermissions = updatetask.InventoryData.EveryoneMask;
7664 newTaskItem.NextPermissions = updatetask.InventoryData.NextOwnerMask; 7663 newTaskItem.NextPermissions = updatetask.InventoryData.NextOwnerMask;
7664
7665 // Unused? Clicking share with group sets GroupPermissions instead, so perhaps this is something
7666 // different
7665 //newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned; 7667 //newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned;
7666 newTaskItem.Type = updatetask.InventoryData.Type; 7668 newTaskItem.Type = updatetask.InventoryData.Type;
7667 newTaskItem.InvType = updatetask.InventoryData.InvType; 7669 newTaskItem.InvType = updatetask.InventoryData.InvType;
7668 newTaskItem.Flags = updatetask.InventoryData.Flags; 7670 newTaskItem.Flags = updatetask.InventoryData.Flags;
7669 //newTaskItem.SaleType=updatetask.InventoryData.SaleType; 7671 //newTaskItem.SaleType=updatetask.InventoryData.SaleType;
7670 //newTaskItem.SalePrice=updatetask.InventoryData.SalePrice;; 7672 //newTaskItem.SalePrice=updatetask.InventoryData.SalePrice;
7671 newTaskItem.Name = Util.FieldToString(updatetask.InventoryData.Name); 7673 newTaskItem.Name = Util.FieldToString(updatetask.InventoryData.Name);
7672 newTaskItem.Description = Util.FieldToString(updatetask.InventoryData.Description); 7674 newTaskItem.Description = Util.FieldToString(updatetask.InventoryData.Description);
7673 newTaskItem.CreationDate = (uint)updatetask.InventoryData.CreationDate; 7675 newTaskItem.CreationDate = (uint)updatetask.InventoryData.CreationDate;
@@ -7675,7 +7677,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7675 newTaskItem, updatetask.UpdateData.LocalID); 7677 newTaskItem, updatetask.UpdateData.LocalID);
7676 } 7678 }
7677 } 7679 }
7678 } 7680 }
7679 7681
7680 return true; 7682 return true;
7681 } 7683 }
@@ -11590,6 +11592,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11590 public PacketMethod method; 11592 public PacketMethod method;
11591 public bool Async; 11593 public bool Async;
11592 } 11594 }
11595
11593 public class AsyncPacketProcess 11596 public class AsyncPacketProcess
11594 { 11597 {
11595 public bool result = false; 11598 public bool result = false;
@@ -11632,4 +11635,4 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11632 OutPacket(packet, ThrottleOutPacketType.Task); 11635 OutPacket(packet, ThrottleOutPacketType.Task);
11633 } 11636 }
11634 } 11637 }
11635} 11638} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 42a748f..26d3372 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1222,6 +1222,7 @@ namespace OpenSim.Region.Framework.Scenes
1222 item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); 1222 item = CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID);
1223 } 1223 }
1224 1224
1225 // If we've found the item in the user's inventory or in the library
1225 if (item != null) 1226 if (item != null)
1226 { 1227 {
1227 part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); 1228 part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
index 71354b4..4034744 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs
@@ -173,7 +173,9 @@ namespace OpenSim.Region.Framework.Scenes
173 item.NextPermissions; 173 item.NextPermissions;
174 taskItem.NextPermissions = item.NextPermissions; 174 taskItem.NextPermissions = item.NextPermissions;
175 taskItem.CurrentPermissions |= 8; 175 taskItem.CurrentPermissions |= 8;
176 } else { 176 }
177 else
178 {
177 taskItem.BasePermissions = item.BasePermissions; 179 taskItem.BasePermissions = item.BasePermissions;
178 taskItem.CurrentPermissions = item.CurrentPermissions; 180 taskItem.CurrentPermissions = item.CurrentPermissions;
179 taskItem.CurrentPermissions |= 8; 181 taskItem.CurrentPermissions |= 8;
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 21ca1de..d175695 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -528,6 +528,7 @@ namespace OpenSim.Region.Framework.Scenes
528 item.ParentID = m_part.UUID; 528 item.ParentID = m_part.UUID;
529 item.ParentPartID = m_part.UUID; 529 item.ParentPartID = m_part.UUID;
530 item.Name = name; 530 item.Name = name;
531 item.GroupID = m_part.GroupID;
531 532
532 lock (m_items) 533 lock (m_items)
533 { 534 {
@@ -620,6 +621,12 @@ namespace OpenSim.Region.Framework.Scenes
620 item.ParentID = m_part.UUID; 621 item.ParentID = m_part.UUID;
621 item.ParentPartID = m_part.UUID; 622 item.ParentPartID = m_part.UUID;
622 item.Flags = m_items[item.ItemID].Flags; 623 item.Flags = m_items[item.ItemID].Flags;
624
625 // If group permissions have been set on, check that the groupID is up to date in case it has
626 // changed since permissions were last set.
627 if (item.GroupPermissions != (uint)PermissionMask.None)
628 item.GroupID = m_part.GroupID;
629
623 if (item.AssetID == UUID.Zero) 630 if (item.AssetID == UUID.Zero)
624 { 631 {
625 item.AssetID = m_items[item.ItemID].AssetID; 632 item.AssetID = m_items[item.ItemID].AssetID;
@@ -771,6 +778,7 @@ namespace OpenSim.Region.Framework.Scenes
771 uint everyoneMask = 0; 778 uint everyoneMask = 0;
772 uint baseMask = item.BasePermissions; 779 uint baseMask = item.BasePermissions;
773 uint ownerMask = item.CurrentPermissions; 780 uint ownerMask = item.CurrentPermissions;
781 uint groupMask = item.GroupPermissions;
774 782
775 invString.AddItemStart(); 783 invString.AddItemStart();
776 invString.AddNameValueLine("item_id", item.ItemID.ToString()); 784 invString.AddNameValueLine("item_id", item.ItemID.ToString());
@@ -780,7 +788,7 @@ namespace OpenSim.Region.Framework.Scenes
780 788
781 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); 789 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask));
782 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); 790 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask));
783 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0)); 791 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask));
784 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); 792 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask));
785 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); 793 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
786 794