aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorUbitUmarov2015-09-12 07:24:35 +0100
committerUbitUmarov2015-09-12 07:24:35 +0100
commit8e920ac59d89d0031dc16ff5ebb5d39526bb3a8d (patch)
treecdfb9fefab60262ccbf23e295830b6595a91001b /OpenSim
parent try to better merge avn and os fetchinventory and fetchinvdescendents (diff)
downloadopensim-SC-8e920ac59d89d0031dc16ff5ebb5d39526bb3a8d.zip
opensim-SC-8e920ac59d89d0031dc16ff5ebb5d39526bb3a8d.tar.gz
opensim-SC-8e920ac59d89d0031dc16ff5ebb5d39526bb3a8d.tar.bz2
opensim-SC-8e920ac59d89d0031dc16ff5ebb5d39526bb3a8d.tar.xz
try to validate textures from library folder
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
index c14e89f..01d9aad 100644
--- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
+++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetXferUploader.cs
@@ -472,6 +472,17 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
472 m_transactions.RemoveXferUploader(m_transactionID); 472 m_transactions.RemoveXferUploader(m_transactionID);
473 } 473 }
474 474
475 private int checkLibrary(UUID itemID)
476 {
477 ILibraryService m_library = m_Scene.RequestModuleInterface<ILibraryService>();
478 InventoryItemBase item = null;
479 if (m_library != null)
480 item = m_library.LibraryRootFolder.FindAsset(itemID);
481
482 if (item == null)
483 return 0;
484 return (int)item.CurrentPermissions;
485 }
475 486
476 private void ValidateAssets() 487 private void ValidateAssets()
477 { 488 {
@@ -527,6 +538,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction
527 else 538 else
528 { 539 {
529 int perms = m_Scene.InventoryService.GetAssetPermissions(ourClient.AgentId, tx); 540 int perms = m_Scene.InventoryService.GetAssetPermissions(ourClient.AgentId, tx);
541 if (perms == 0)
542 perms = checkLibrary(tx);
543
530 int full = (int)(PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Copy); 544 int full = (int)(PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Copy);
531 545
532 if ((perms & full) != full) 546 if ((perms & full) != full)