diff options
author | Melanie Thielker | 2016-04-29 21:23:32 +0200 |
---|---|---|
committer | Melanie Thielker | 2016-04-29 21:23:32 +0200 |
commit | d42de53ddaeae154f17bbc240bdfdf6a349ea860 (patch) | |
tree | 2c5f3a9347a843251f61d633d0fa40e2275dc3d9 /OpenSim/Region/CoreModules | |
parent | Prevent "Object->Take" from working on attachments. (diff) | |
download | opensim-SC_OLD-d42de53ddaeae154f17bbc240bdfdf6a349ea860.zip opensim-SC_OLD-d42de53ddaeae154f17bbc240bdfdf6a349ea860.tar.gz opensim-SC_OLD-d42de53ddaeae154f17bbc240bdfdf6a349ea860.tar.bz2 opensim-SC_OLD-d42de53ddaeae154f17bbc240bdfdf6a349ea860.tar.xz |
Allow default permissions from the viewer to be applied to uploaded objects.
Make inventory items reflect coorect permissions immediately unstead of after relog
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | 34 |
2 files changed, 27 insertions, 9 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs index 64bcfa2..60a254e 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs | |||
@@ -429,7 +429,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction | |||
429 | 429 | ||
430 | m_transactions.RemoveXferUploader(m_transactionID); | 430 | m_transactions.RemoveXferUploader(m_transactionID); |
431 | 431 | ||
432 | m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(ourClient.AgentId, (AssetType)type, m_asset.FullID, m_asset.Name, 0); | 432 | m_Scene.EventManager.TriggerOnNewInventoryItemUploadComplete(item, 0); |
433 | } | 433 | } |
434 | 434 | ||
435 | /// <summary> | 435 | /// <summary> |
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs index 582b267..6b78fe8 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/HGInventoryAccessModule.cs | |||
@@ -209,15 +209,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
209 | } | 209 | } |
210 | } | 210 | } |
211 | 211 | ||
212 | public void PostInventoryAsset(UUID avatarID, AssetType type, UUID assetID, string name, int userlevel) | 212 | public void PostInventoryAsset(InventoryItemBase item, int userlevel) |
213 | { | 213 | { |
214 | if (type == AssetType.Link) | 214 | if (item.AssetType == (int)AssetType.Link) |
215 | return; | 215 | return; |
216 | 216 | ||
217 | string userAssetServer = string.Empty; | 217 | string userAssetServer = string.Empty; |
218 | if (IsForeignUser(avatarID, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) | 218 | if (IsForeignUser(item.Owner, out userAssetServer) && userAssetServer != string.Empty && m_OutboundPermission) |
219 | { | 219 | { |
220 | m_assMapper.Post(assetID, avatarID, userAssetServer); | 220 | m_assMapper.Post(item.AssetID, item.Owner, userAssetServer); |
221 | } | 221 | } |
222 | } | 222 | } |
223 | 223 | ||
@@ -248,7 +248,15 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
248 | { | 248 | { |
249 | UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data); | 249 | UUID newAssetID = base.CapsUpdateInventoryItemAsset(remoteClient, itemID, data); |
250 | 250 | ||
251 | PostInventoryAsset(remoteClient.AgentId, AssetType.Unknown, newAssetID, "", 0); | 251 | // We need to construct this here to satisfy the calling convention. |
252 | // Better this in two places than five formal params in all others. | ||
253 | InventoryItemBase item = new InventoryItemBase(); | ||
254 | item.Owner = remoteClient.AgentId; | ||
255 | item.AssetType = (int)AssetType.Unknown; | ||
256 | item.AssetID = newAssetID; | ||
257 | item.Name = String.Empty; | ||
258 | |||
259 | PostInventoryAsset(item, 0); | ||
252 | 260 | ||
253 | return newAssetID; | 261 | return newAssetID; |
254 | } | 262 | } |
@@ -260,7 +268,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
260 | { | 268 | { |
261 | if (base.UpdateInventoryItemAsset(ownerID, item, asset)) | 269 | if (base.UpdateInventoryItemAsset(ownerID, item, asset)) |
262 | { | 270 | { |
263 | PostInventoryAsset(ownerID, (AssetType)asset.Type, asset.FullID, asset.Name, 0); | 271 | PostInventoryAsset(item, 0); |
264 | return true; | 272 | return true; |
265 | } | 273 | } |
266 | 274 | ||
@@ -273,9 +281,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
273 | protected override void ExportAsset(UUID agentID, UUID assetID) | 281 | protected override void ExportAsset(UUID agentID, UUID assetID) |
274 | { | 282 | { |
275 | if (!assetID.Equals(UUID.Zero)) | 283 | if (!assetID.Equals(UUID.Zero)) |
276 | PostInventoryAsset(agentID, AssetType.Unknown, assetID, "", 0); | 284 | { |
285 | InventoryItemBase item = new InventoryItemBase(); | ||
286 | item.Owner = agentID; | ||
287 | item.AssetType = (int)AssetType.Unknown; | ||
288 | item.AssetID = assetID; | ||
289 | item.Name = String.Empty; | ||
290 | |||
291 | PostInventoryAsset(item, 0); | ||
292 | } | ||
277 | else | 293 | else |
294 | { | ||
278 | m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); | 295 | m_log.Debug("[HGScene]: Scene.Inventory did not create asset"); |
296 | } | ||
279 | } | 297 | } |
280 | 298 | ||
281 | /// | 299 | /// |
@@ -535,4 +553,4 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
535 | 553 | ||
536 | #endregion | 554 | #endregion |
537 | } | 555 | } |
538 | } \ No newline at end of file | 556 | } |