diff options
author | Justin Clark-Casey (justincc) | 2012-05-23 01:58:10 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-23 01:58:10 +0100 |
commit | ff429a259b41f1205a6b153bb6da383d9a9f5daf (patch) | |
tree | 70d7a495cc6d846ef593f8bb0ed608c31b78f079 /OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |
parent | Setting 'in transit' on a local teleport as well as inter-region teleports. (diff) | |
download | opensim-SC-ff429a259b41f1205a6b153bb6da383d9a9f5daf.zip opensim-SC-ff429a259b41f1205a6b153bb6da383d9a9f5daf.tar.gz opensim-SC-ff429a259b41f1205a6b153bb6da383d9a9f5daf.tar.bz2 opensim-SC-ff429a259b41f1205a6b153bb6da383d9a9f5daf.tar.xz |
Fix bug where an avatar that had an object they owned attached through llAttachToAvatar() or osForceAttachToAvatar() would wrongly have next permissions come into play when they detached that object and rezzed it in scene.
This is because the attachments module code was setting the 'object slam' bit by using PermissionMask.All
Solution here is to route the attachment item creation call through the existing inventory code in BasicInventoryAccessModule rather than copy/pasted code in AttachmentsModule itself.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 3734e03..d27d9e1 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | |||
@@ -1027,10 +1027,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
1027 | 1027 | ||
1028 | public void ApplyNextOwnerPermissions() | 1028 | public void ApplyNextOwnerPermissions() |
1029 | { | 1029 | { |
1030 | Util.PrintCallStack(); | ||
1031 | |||
1030 | lock (m_items) | 1032 | lock (m_items) |
1031 | { | 1033 | { |
1032 | foreach (TaskInventoryItem item in m_items.Values) | 1034 | foreach (TaskInventoryItem item in m_items.Values) |
1033 | { | 1035 | { |
1036 | // m_log.DebugFormat ( | ||
1037 | // "[SCENE OBJECT PART INVENTORY]: Applying next permissions {0} to {1} in {2} with current {3}, base {4}, everyone {5}", | ||
1038 | // item.NextPermissions, item.Name, m_part.Name, item.CurrentPermissions, item.BasePermissions, item.EveryonePermissions); | ||
1039 | |||
1034 | if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0) | 1040 | if (item.InvType == (int)InventoryType.Object && (item.CurrentPermissions & 7) != 0) |
1035 | { | 1041 | { |
1036 | if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0) | 1042 | if ((item.CurrentPermissions & ((uint)PermissionMask.Copy >> 13)) == 0) |
@@ -1040,6 +1046,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1040 | if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0) | 1046 | if ((item.CurrentPermissions & ((uint)PermissionMask.Modify >> 13)) == 0) |
1041 | item.CurrentPermissions &= ~(uint)PermissionMask.Modify; | 1047 | item.CurrentPermissions &= ~(uint)PermissionMask.Modify; |
1042 | } | 1048 | } |
1049 | |||
1043 | item.CurrentPermissions &= item.NextPermissions; | 1050 | item.CurrentPermissions &= item.NextPermissions; |
1044 | item.BasePermissions &= item.NextPermissions; | 1051 | item.BasePermissions &= item.NextPermissions; |
1045 | item.EveryonePermissions &= item.NextPermissions; | 1052 | item.EveryonePermissions &= item.NextPermissions; |