diff options
Diffstat (limited to '')
6 files changed, 49 insertions, 28 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a3e275d..6dda5aa 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -2156,16 +2156,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2156 | 2156 | ||
2157 | protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) | 2157 | protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) |
2158 | { | 2158 | { |
2159 | // XXX: Nasty temporary move that will be resolved shortly | ||
2160 | InventoryFolderImpl folder = (InventoryFolderImpl)folderBase; | ||
2161 | |||
2162 | // We will use the same transaction id for all the separate packets to be sent out in this update. | 2159 | // We will use the same transaction id for all the separate packets to be sent out in this update. |
2163 | UUID transactionId = UUID.Random(); | 2160 | UUID transactionId = UUID.Random(); |
2164 | 2161 | ||
2165 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks | 2162 | List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks |
2166 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); | 2163 | = new List<BulkUpdateInventoryPacket.FolderDataBlock>(); |
2167 | 2164 | ||
2168 | SendBulkUpdateInventoryFolderRecursive(folder, ref folderDataBlocks, transactionId); | 2165 | SendBulkUpdateInventoryFolderRecursive(folderBase, ref folderDataBlocks, transactionId); |
2169 | 2166 | ||
2170 | if (folderDataBlocks.Count > 0) | 2167 | if (folderDataBlocks.Count > 0) |
2171 | { | 2168 | { |
@@ -2191,17 +2188,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2191 | /// <param name="folderDataBlocks"></param> | 2188 | /// <param name="folderDataBlocks"></param> |
2192 | /// <param name="transactionId"></param> | 2189 | /// <param name="transactionId"></param> |
2193 | private void SendBulkUpdateInventoryFolderRecursive( | 2190 | private void SendBulkUpdateInventoryFolderRecursive( |
2194 | InventoryFolderImpl folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, | 2191 | InventoryFolderBase folder, ref List<BulkUpdateInventoryPacket.FolderDataBlock> folderDataBlocks, |
2195 | UUID transactionId) | 2192 | UUID transactionId) |
2196 | { | 2193 | { |
2197 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); | 2194 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); |
2198 | 2195 | ||
2199 | const int MAX_ITEMS_PER_PACKET = 5; | 2196 | const int MAX_ITEMS_PER_PACKET = 5; |
2200 | 2197 | ||
2198 | IInventoryService invService = m_scene.RequestModuleInterface<IInventoryService>(); | ||
2201 | // If there are any items then we have to start sending them off in this packet - the next folder will have | 2199 | // If there are any items then we have to start sending them off in this packet - the next folder will have |
2202 | // to be in its own bulk update packet. Also, we can only fit 5 items in a packet (at least this was the limit | 2200 | // to be in its own bulk update packet. Also, we can only fit 5 items in a packet (at least this was the limit |
2203 | // being used on the Linden grid at 20081203). | 2201 | // being used on the Linden grid at 20081203). |
2204 | List<InventoryItemBase> items = folder.RequestListOfItems(); | 2202 | InventoryCollection contents = invService.GetFolderContent(AgentId, folder.ID); // folder.RequestListOfItems(); |
2203 | List<InventoryItemBase> items = contents.Items; | ||
2205 | while (items.Count > 0) | 2204 | while (items.Count > 0) |
2206 | { | 2205 | { |
2207 | BulkUpdateInventoryPacket bulkUpdate | 2206 | BulkUpdateInventoryPacket bulkUpdate |
@@ -2233,8 +2232,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
2233 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); | 2232 | folderDataBlocks.Add(GenerateBulkUpdateFolderDataBlock(folder)); |
2234 | } | 2233 | } |
2235 | 2234 | ||
2236 | List<InventoryFolderImpl> subFolders = folder.RequestListOfFolderImpls(); | 2235 | List<InventoryFolderBase> subFolders = contents.Folders; |
2237 | foreach (InventoryFolderImpl subFolder in subFolders) | 2236 | foreach (InventoryFolderBase subFolder in subFolders) |
2238 | { | 2237 | { |
2239 | SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); | 2238 | SendBulkUpdateInventoryFolderRecursive(subFolder, ref folderDataBlocks, transactionId); |
2240 | } | 2239 | } |
diff --git a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs index 956dd10..71ff28c 100644 --- a/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs +++ b/OpenSim/Region/CoreModules/Agent/TextureDownload/TextureDownloadModule.cs | |||
@@ -222,8 +222,12 @@ namespace OpenSim.Region.CoreModules.Agent.TextureDownload | |||
222 | if (invService.GetRootFolder(client.AgentId) == null) // Deny no inventory | 222 | if (invService.GetRootFolder(client.AgentId) == null) // Deny no inventory |
223 | return; | 223 | return; |
224 | 224 | ||
225 | if (profile.UserProfile.GodLevel < 200 && profile.RootFolder.FindAsset(e.RequestedAssetID) == null) // Deny if not owned | 225 | // Diva 2009-08-13: this test doesn't make any sense to many devs |
226 | return; | 226 | //if (profile.UserProfile.GodLevel < 200 && profile.RootFolder.FindAsset(e.RequestedAssetID) == null) // Deny if not owned |
227 | //{ | ||
228 | // m_log.WarnFormat("[TEXTURE]: user {0} doesn't have permissions to texture {1}"); | ||
229 | // return; | ||
230 | //} | ||
227 | 231 | ||
228 | m_log.Debug("Texture preview"); | 232 | m_log.Debug("Texture preview"); |
229 | } | 233 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs index 0526bc4..ef5ffe1 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/BaseInventoryConnector.cs | |||
@@ -82,7 +82,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
82 | /// </summary> | 82 | /// </summary> |
83 | /// <param name="userID"></param> | 83 | /// <param name="userID"></param> |
84 | /// <returns>null if no root folder was found</returns> | 84 | /// <returns>null if no root folder was found</returns> |
85 | public abstract InventoryFolderBase GetRootFolder(UUID userID); | 85 | public InventoryFolderBase GetRootFolder(UUID userID) |
86 | { | ||
87 | // Root folder is here as system type Folder. | ||
88 | return m_cache.GetFolderForType(userID, AssetType.Folder); | ||
89 | } | ||
86 | 90 | ||
87 | public abstract Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID); | 91 | public abstract Dictionary<AssetType, InventoryFolderBase> GetSystemFolders(UUID userID); |
88 | 92 | ||
@@ -202,5 +206,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
202 | /// <returns></returns> | 206 | /// <returns></returns> |
203 | public abstract List<InventoryItemBase> GetActiveGestures(UUID userId); | 207 | public abstract List<InventoryItemBase> GetActiveGestures(UUID userId); |
204 | 208 | ||
209 | public abstract int GetAssetPermissions(UUID userID, UUID assetID); | ||
205 | } | 210 | } |
206 | } | 211 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index db4e7f4..fd12a57 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | |||
@@ -263,6 +263,8 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
263 | folders[(AssetType)folder.Type] = folder; | 263 | folders[(AssetType)folder.Type] = folder; |
264 | } | 264 | } |
265 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: System folders count for {0}: {1}", userID, folders.Count); | 265 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: System folders count for {0}: {1}", userID, folders.Count); |
266 | // Put the root folder there, as type Folder | ||
267 | folders[AssetType.Folder] = root; | ||
266 | return folders; | 268 | return folders; |
267 | } | 269 | } |
268 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Root folder content not found for {0}", userID); | 270 | m_log.DebugFormat("[HG INVENTORY CONNECTOR]: Root folder content not found for {0}", userID); |
@@ -422,14 +424,21 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
422 | return false; | 424 | return false; |
423 | } | 425 | } |
424 | 426 | ||
425 | public override InventoryFolderBase GetRootFolder(UUID userID) | 427 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) |
426 | { | 428 | { |
427 | return null; | 429 | return new List<InventoryItemBase>(); |
428 | } | 430 | } |
429 | 431 | ||
430 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) | 432 | public override int GetAssetPermissions(UUID userID, UUID assetID) |
431 | { | 433 | { |
432 | return new List<InventoryItemBase>(); | 434 | if (IsLocalGridUser(userID)) |
435 | return m_GridService.GetAssetPermissions(userID, assetID); | ||
436 | else | ||
437 | { | ||
438 | UUID sessionID = GetSessionID(userID); | ||
439 | string uri = GetUserInventoryURI(userID) + "/" + userID.ToString(); | ||
440 | return m_HGService.GetAssetPermissions(uri, assetID, sessionID); | ||
441 | } | ||
433 | } | 442 | } |
434 | 443 | ||
435 | #endregion | 444 | #endregion |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs index ccf06d1..2fbc5fe 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/LocalInventoryServiceConnector.cs | |||
@@ -201,8 +201,15 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
201 | foreach (InventoryFolderBase folder in content.Folders) | 201 | foreach (InventoryFolderBase folder in content.Folders) |
202 | { | 202 | { |
203 | if ((folder.Type != (short)AssetType.Folder) && (folder.Type != (short)AssetType.Unknown)) | 203 | if ((folder.Type != (short)AssetType.Folder) && (folder.Type != (short)AssetType.Unknown)) |
204 | { | ||
205 | m_log.InfoFormat("[INVENTORY CONNECTOR]: folder type {0} ", folder.Type); | ||
204 | folders[(AssetType)folder.Type] = folder; | 206 | folders[(AssetType)folder.Type] = folder; |
207 | } | ||
205 | } | 208 | } |
209 | // Put the root folder there, as type Folder | ||
210 | folders[AssetType.Folder] = root; | ||
211 | m_log.InfoFormat("[INVENTORY CONNECTOR]: root folder is type {0} ", root.Type); | ||
212 | |||
206 | return folders; | 213 | return folders; |
207 | } | 214 | } |
208 | } | 215 | } |
@@ -312,19 +319,14 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
312 | return m_InventoryService.HasInventoryForUser(userID); | 319 | return m_InventoryService.HasInventoryForUser(userID); |
313 | } | 320 | } |
314 | 321 | ||
315 | /// <summary> | 322 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) |
316 | /// Retrieve the root inventory folder for the given user. | ||
317 | /// </summary> | ||
318 | /// <param name="userID"></param> | ||
319 | /// <returns>null if no root folder was found</returns> | ||
320 | public override InventoryFolderBase GetRootFolder(UUID userID) | ||
321 | { | 323 | { |
322 | return m_InventoryService.GetRootFolder(userID); | 324 | return m_InventoryService.GetActiveGestures(userId); |
323 | } | 325 | } |
324 | 326 | ||
325 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) | 327 | public override int GetAssetPermissions(UUID userID, UUID assetID) |
326 | { | 328 | { |
327 | return m_InventoryService.GetActiveGestures(userId); | 329 | return m_InventoryService.GetAssetPermissions(userID, assetID); |
328 | } | 330 | } |
329 | #endregion IInventoryService | 331 | #endregion IInventoryService |
330 | } | 332 | } |
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs index 4f19573..e4bb865 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteInventoryServiceConnector.cs | |||
@@ -296,16 +296,18 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory | |||
296 | return false; | 296 | return false; |
297 | } | 297 | } |
298 | 298 | ||
299 | public override InventoryFolderBase GetRootFolder(UUID userID) | 299 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) |
300 | { | 300 | { |
301 | return null; | 301 | return new List<InventoryItemBase>(); |
302 | } | 302 | } |
303 | 303 | ||
304 | public override List<InventoryItemBase> GetActiveGestures(UUID userId) | 304 | public override int GetAssetPermissions(UUID userID, UUID assetID) |
305 | { | 305 | { |
306 | return new List<InventoryItemBase>(); | 306 | UUID sessionID = GetSessionID(userID); |
307 | return m_RemoteConnector.GetAssetPermissions(userID.ToString(), assetID, sessionID); | ||
307 | } | 308 | } |
308 | 309 | ||
310 | |||
309 | #endregion | 311 | #endregion |
310 | 312 | ||
311 | private UUID GetSessionID(UUID userID) | 313 | private UUID GetSessionID(UUID userID) |