From 8e920ac59d89d0031dc16ff5ebb5d39526bb3a8d Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 12 Sep 2015 07:24:35 +0100 Subject: try to validate textures from library folder --- .../Agent/AssetTransaction/AssetXferUploader.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'OpenSim/Region/CoreModules/Agent') 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 m_transactions.RemoveXferUploader(m_transactionID); } + private int checkLibrary(UUID itemID) + { + ILibraryService m_library = m_Scene.RequestModuleInterface(); + InventoryItemBase item = null; + if (m_library != null) + item = m_library.LibraryRootFolder.FindAsset(itemID); + + if (item == null) + return 0; + return (int)item.CurrentPermissions; + } private void ValidateAssets() { @@ -527,6 +538,9 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction else { int perms = m_Scene.InventoryService.GetAssetPermissions(ourClient.AgentId, tx); + if (perms == 0) + perms = checkLibrary(tx); + int full = (int)(PermissionMask.Modify | PermissionMask.Transfer | PermissionMask.Copy); if ((perms & full) != full) -- cgit v1.1