From 5700c582ba3727678dfd87f80dab8d09da88df63 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jul 2011 22:28:17 +0100 Subject: refactor: rename bool returning GetAgentInventoryItem() to CanGetAgentInventoryItem() to improve code readability --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 7 +++---- .../Framework/InventoryAccess/InventoryAccessModule.cs | 2 +- OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs | 10 +++++++++- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f53e236..c176c2b 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -7548,13 +7548,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP IInventoryAccessModule invAccess = m_scene.RequestModuleInterface(); if (invAccess != null) { - if (!invAccess.GetAgentInventoryItem(this, itemID, requestID)) + if (!invAccess.CanGetAgentInventoryItem(this, itemID, requestID)) return false; - } else + { return false; - + } } } } @@ -7568,7 +7568,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP { AssetUploadRequestPacket request = (AssetUploadRequestPacket)Pack; - // m_log.Debug("upload request " + request.ToString()); // m_log.Debug("upload request was for assetid: " + request.AssetBlock.TransactionID.Combine(this.SecureSessionId).ToString()); UUID temp = UUID.Combine(request.AssetBlock.TransactionID, SecureSessionId); diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 2930303..f7d187d 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -978,7 +978,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess { } - public virtual bool GetAgentInventoryItem(IClientAPI remoteClient, UUID itemID, UUID requestID) + public virtual bool CanGetAgentInventoryItem(IClientAPI remoteClient, UUID itemID, UUID requestID) { InventoryItemBase assetRequestItem = GetItem(remoteClient.AgentId, itemID); if (assetRequestItem == null) diff --git a/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs b/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs index 305975e..da11e61 100644 --- a/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IInventoryAccessModule.cs @@ -59,7 +59,15 @@ namespace OpenSim.Region.Framework.Interfaces UUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, bool RezSelected, bool RemoveItem, UUID fromTaskID, bool attachment); void TransferInventoryAssets(InventoryItemBase item, UUID sender, UUID receiver); - bool GetAgentInventoryItem(IClientAPI remoteClient, UUID itemID, UUID requestID); + + /// + /// Does the client have sufficient permissions to retrieve the inventory item? + /// + /// + /// + /// + /// + bool CanGetAgentInventoryItem(IClientAPI remoteClient, UUID itemID, UUID requestID); // Must be here because of textures in user's inventory bool IsForeignUser(UUID userID, out string assetServerURL); -- cgit v1.1