aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-04-05 19:37:02 +0100
committerJustin Clark-Casey (justincc)2010-04-05 19:37:02 +0100
commit9ecad5041944ad51a815972ace5366430973503c (patch)
tree9506d7568dd215a21fc2b3aee5df1ba39b56a23c /OpenSim/Region/Framework
parentUpdates to config files for groups (diff)
downloadopensim-SC_OLD-9ecad5041944ad51a815972ace5366430973503c.zip
opensim-SC_OLD-9ecad5041944ad51a815972ace5366430973503c.tar.gz
opensim-SC_OLD-9ecad5041944ad51a815972ace5366430973503c.tar.bz2
opensim-SC_OLD-9ecad5041944ad51a815972ace5366430973503c.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
Diffstat (limited to 'OpenSim/Region/Framework')
-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
3 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 31c0be1..3b7f38e 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1160,6 +1160,7 @@ namespace OpenSim.Region.Framework.Scenes
1160 item = LibraryService.LibraryRootFolder.FindItem(itemID); 1160 item = LibraryService.LibraryRootFolder.FindItem(itemID);
1161 } 1161 }
1162 1162
1163 // If we've found the item in the user's inventory or in the library
1163 if (item != null) 1164 if (item != null)
1164 { 1165 {
1165 part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID); 1166 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 77bf6fe..2e13f90 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -527,6 +527,7 @@ namespace OpenSim.Region.Framework.Scenes
527 item.ParentID = m_part.UUID; 527 item.ParentID = m_part.UUID;
528 item.ParentPartID = m_part.UUID; 528 item.ParentPartID = m_part.UUID;
529 item.Name = name; 529 item.Name = name;
530 item.GroupID = m_part.GroupID;
530 531
531 lock (m_items) 532 lock (m_items)
532 { 533 {
@@ -619,6 +620,12 @@ namespace OpenSim.Region.Framework.Scenes
619 item.ParentID = m_part.UUID; 620 item.ParentID = m_part.UUID;
620 item.ParentPartID = m_part.UUID; 621 item.ParentPartID = m_part.UUID;
621 item.Flags = m_items[item.ItemID].Flags; 622 item.Flags = m_items[item.ItemID].Flags;
623
624 // If group permissions have been set on, check that the groupID is up to date in case it has
625 // changed since permissions were last set.
626 if (item.GroupPermissions != (uint)PermissionMask.None)
627 item.GroupID = m_part.GroupID;
628
622 if (item.AssetID == UUID.Zero) 629 if (item.AssetID == UUID.Zero)
623 { 630 {
624 item.AssetID = m_items[item.ItemID].AssetID; 631 item.AssetID = m_items[item.ItemID].AssetID;
@@ -770,6 +777,7 @@ namespace OpenSim.Region.Framework.Scenes
770 uint everyoneMask = 0; 777 uint everyoneMask = 0;
771 uint baseMask = item.BasePermissions; 778 uint baseMask = item.BasePermissions;
772 uint ownerMask = item.CurrentPermissions; 779 uint ownerMask = item.CurrentPermissions;
780 uint groupMask = item.GroupPermissions;
773 781
774 invString.AddItemStart(); 782 invString.AddItemStart();
775 invString.AddNameValueLine("item_id", item.ItemID.ToString()); 783 invString.AddNameValueLine("item_id", item.ItemID.ToString());
@@ -779,7 +787,7 @@ namespace OpenSim.Region.Framework.Scenes
779 787
780 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask)); 788 invString.AddNameValueLine("base_mask", Utils.UIntToHexString(baseMask));
781 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask)); 789 invString.AddNameValueLine("owner_mask", Utils.UIntToHexString(ownerMask));
782 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(0)); 790 invString.AddNameValueLine("group_mask", Utils.UIntToHexString(groupMask));
783 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask)); 791 invString.AddNameValueLine("everyone_mask", Utils.UIntToHexString(everyoneMask));
784 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions)); 792 invString.AddNameValueLine("next_owner_mask", Utils.UIntToHexString(item.NextPermissions));
785 793