aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs35
1 files changed, 27 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
index bfa9763..8275ceb 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs
@@ -151,23 +151,42 @@ 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 = item.Owner; 154 taskItem.OwnerID = part.OwnerID; // Transfer ownership
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 taskItem.BasePermissions = item.BasePermissions; 159 if (remoteClient!=null && remoteClient.AgentId!=part.OwnerID &&
160 taskItem.CurrentPermissions = item.CurrentPermissions; 160 m_scene.ExternalChecks.ExternalChecksPropagatePermissions()) {
161 // FIXME: ignoring group permissions for now as they aren't stored in item 161 taskItem.BasePermissions = item.BasePermissions & item.NextPermissions;
162 taskItem.EveryonePermissions = item.EveryOnePermissions; 162 taskItem.CurrentPermissions = item.CurrentPermissions & item.NextPermissions;
163 taskItem.NextPermissions = item.NextPermissions; 163 taskItem.EveryonePermissions = item.EveryOnePermissions & 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
164 taskItem.Flags = item.Flags; 176 taskItem.Flags = item.Flags;
165 // TODO: These are pending addition of those fields to TaskInventoryItem 177 // TODO: These are pending addition of those fields to TaskInventoryItem
166// taskItem.SalePrice = item.SalePrice; 178// taskItem.SalePrice = item.SalePrice;
167// taskItem.SaleType = item.SaleType; 179// taskItem.SaleType = item.SaleType;
168 taskItem.CreationDate = (uint)item.CreationDate; 180 taskItem.CreationDate = (uint)item.CreationDate;
169 181
170 part.AddInventoryItem(taskItem); 182 bool addFromAllowedDrop = false;
183 if (remoteClient!=null)
184 {
185 addFromAllowedDrop = remoteClient.AgentId!=part.OwnerID &&
186 m_scene.ExternalChecks.ExternalChecksPropagatePermissions();
187 }
188
189 part.AddInventoryItem(taskItem, addFromAllowedDrop);
171 190
172 return true; 191 return true;
173 } 192 }