diff options
author | Dr Scofield | 2008-11-14 13:03:18 +0000 |
---|---|---|
committer | Dr Scofield | 2008-11-14 13:03:18 +0000 |
commit | 5c21ec6d108313080ccf8bdf2212ce52ad80bbb5 (patch) | |
tree | 8d039bfe8603ce2c049a8f26f44fa121ab372afe /OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |
parent | From: Christopher Yeoh <cyeoh@au1.ibm.com> (diff) | |
download | opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.zip opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.tar.gz opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.tar.bz2 opensim-SC-5c21ec6d108313080ccf8bdf2212ce52ad80bbb5.tar.xz |
reverting #7295, as it still fails a test case (as pointed out very
kindly by sean) --- lesson learned: just running a "make test" is not
sufficient, you need to precede it by a "make clean".
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 8275ceb..bfa9763 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -151,42 +151,23 @@ namespace OpenSim.Region.Environment.Scenes | |||
151 | taskItem.AssetID = item.AssetID; | 151 | taskItem.AssetID = item.AssetID; |
152 | taskItem.Name = item.Name; | 152 | taskItem.Name = item.Name; |
153 | taskItem.Description = item.Description; | 153 | taskItem.Description = item.Description; |
154 | taskItem.OwnerID = part.OwnerID; // Transfer ownership | 154 | taskItem.OwnerID = item.Owner; |
155 | taskItem.CreatorID = item.Creator; | 155 | taskItem.CreatorID = item.Creator; |
156 | taskItem.Type = item.AssetType; | 156 | taskItem.Type = item.AssetType; |
157 | taskItem.InvType = item.InvType; | 157 | taskItem.InvType = item.InvType; |
158 | 158 | ||
159 | if (remoteClient!=null && remoteClient.AgentId!=part.OwnerID && | 159 | taskItem.BasePermissions = item.BasePermissions; |
160 | m_scene.ExternalChecks.ExternalChecksPropagatePermissions()) { | 160 | taskItem.CurrentPermissions = item.CurrentPermissions; |
161 | taskItem.BasePermissions = item.BasePermissions & item.NextPermissions; | 161 | // FIXME: ignoring group permissions for now as they aren't stored in item |
162 | taskItem.CurrentPermissions = item.CurrentPermissions & item.NextPermissions; | 162 | taskItem.EveryonePermissions = item.EveryOnePermissions; |
163 | taskItem.EveryonePermissions = item.EveryOnePermissions & item.NextPermissions; | 163 | taskItem.NextPermissions = item.NextPermissions; |
164 | taskItem.NextPermissions = item.NextPermissions; | ||
165 | taskItem.CurrentPermissions |= 8; | ||
166 | } else { | ||
167 | taskItem.BasePermissions = item.BasePermissions; | ||
168 | taskItem.CurrentPermissions = item.CurrentPermissions; | ||
169 | taskItem.CurrentPermissions |= 8; | ||
170 | taskItem.EveryonePermissions = item.EveryOnePermissions; | ||
171 | taskItem.NextPermissions = item.NextPermissions; | ||
172 | } | ||
173 | |||
174 | |||
175 | |||
176 | taskItem.Flags = item.Flags; | 164 | taskItem.Flags = item.Flags; |
177 | // TODO: These are pending addition of those fields to TaskInventoryItem | 165 | // TODO: These are pending addition of those fields to TaskInventoryItem |
178 | // taskItem.SalePrice = item.SalePrice; | 166 | // taskItem.SalePrice = item.SalePrice; |
179 | // taskItem.SaleType = item.SaleType; | 167 | // taskItem.SaleType = item.SaleType; |
180 | taskItem.CreationDate = (uint)item.CreationDate; | 168 | taskItem.CreationDate = (uint)item.CreationDate; |
181 | 169 | ||
182 | bool addFromAllowedDrop = false; | 170 | part.AddInventoryItem(taskItem); |
183 | if (remoteClient!=null) | ||
184 | { | ||
185 | addFromAllowedDrop = remoteClient.AgentId!=part.OwnerID && | ||
186 | m_scene.ExternalChecks.ExternalChecksPropagatePermissions(); | ||
187 | } | ||
188 | |||
189 | part.AddInventoryItem(taskItem, addFromAllowedDrop); | ||
190 | 171 | ||
191 | return true; | 172 | return true; |
192 | } | 173 | } |