diff options
author | Justin Clark-Casey (justincc) | 2010-04-05 19:37:02 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-05-26 20:58:40 +0100 |
commit | 32c43bf59a3b9c3cb0b9eb1d52f664997e39a50d (patch) | |
tree | 235fa911ad8c2c00fbb5a95d15994631b1e197d4 /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |
parent | backport from master fix for attachment display (diff) | |
download | opensim-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 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 10 |
1 files changed, 9 insertions, 1 deletions
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 | ||