diff options
author | Diva Canto | 2009-08-13 11:30:29 -0700 |
---|---|---|
committer | Diva Canto | 2009-08-13 11:30:29 -0700 |
commit | 6b9cc6c48d7b49cc4bce5dce4e66d7856a093b75 (patch) | |
tree | 82b2f99cb17b12d2bae173e33065170200b49eae /OpenSim/Region/CoreModules/World | |
parent | Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-6b9cc6c48d7b49cc4bce5dce4e66d7856a093b75.zip opensim-SC_OLD-6b9cc6c48d7b49cc4bce5dce4e66d7856a093b75.tar.gz opensim-SC_OLD-6b9cc6c48d7b49cc4bce5dce4e66d7856a093b75.tar.bz2 opensim-SC_OLD-6b9cc6c48d7b49cc4bce5dce4e66d7856a093b75.tar.xz |
Inventory redirects from CachedUserInfo to InventoryService COMPLETE!
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | 46 |
1 files changed, 7 insertions, 39 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 6db9cbf..8f99395 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -35,6 +35,7 @@ using OpenSim.Framework; | |||
35 | using OpenSim.Framework.Communications.Cache; | 35 | using OpenSim.Framework.Communications.Cache; |
36 | using OpenSim.Region.Framework.Interfaces; | 36 | using OpenSim.Region.Framework.Interfaces; |
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Services.Interfaces; | ||
38 | 39 | ||
39 | // Temporary fix of wrong GroupPowers constants in OpenMetaverse library | 40 | // Temporary fix of wrong GroupPowers constants in OpenMetaverse library |
40 | enum GroupPowers : long | 41 | enum GroupPowers : long |
@@ -964,19 +965,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
964 | 965 | ||
965 | if (objectID == UUID.Zero) // User inventory | 966 | if (objectID == UUID.Zero) // User inventory |
966 | { | 967 | { |
967 | CachedUserInfo userInfo = | 968 | IInventoryService invService = m_scene.InventoryService; |
968 | scene.CommsManager.UserProfileCacheService.GetUserDetails(user); | 969 | InventoryItemBase assetRequestItem = invService.QueryItem(new InventoryItemBase(notecard)); |
969 | |||
970 | if (userInfo == null) | ||
971 | { | ||
972 | m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for edit notecard check", user); | ||
973 | return false; | ||
974 | } | ||
975 | |||
976 | if (userInfo.RootFolder == null) | ||
977 | return false; | ||
978 | |||
979 | InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(notecard); | ||
980 | if (assetRequestItem == null) // Library item | 970 | if (assetRequestItem == null) // Library item |
981 | { | 971 | { |
982 | assetRequestItem = scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); | 972 | assetRequestItem = scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); |
@@ -1394,19 +1384,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1394 | 1384 | ||
1395 | if (objectID == UUID.Zero) // User inventory | 1385 | if (objectID == UUID.Zero) // User inventory |
1396 | { | 1386 | { |
1397 | CachedUserInfo userInfo = | 1387 | IInventoryService invService = m_scene.InventoryService; |
1398 | scene.CommsManager.UserProfileCacheService.GetUserDetails(user); | 1388 | InventoryItemBase assetRequestItem = invService.QueryItem(new InventoryItemBase(script)); |
1399 | |||
1400 | if (userInfo == null) | ||
1401 | { | ||
1402 | m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for administrator check", user); | ||
1403 | return false; | ||
1404 | } | ||
1405 | |||
1406 | if (userInfo.RootFolder == null) | ||
1407 | return false; | ||
1408 | |||
1409 | InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(script); | ||
1410 | if (assetRequestItem == null) // Library item | 1389 | if (assetRequestItem == null) // Library item |
1411 | { | 1390 | { |
1412 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(script); | 1391 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(script); |
@@ -1499,19 +1478,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1499 | 1478 | ||
1500 | if (objectID == UUID.Zero) // User inventory | 1479 | if (objectID == UUID.Zero) // User inventory |
1501 | { | 1480 | { |
1502 | CachedUserInfo userInfo = | 1481 | IInventoryService invService = m_scene.InventoryService; |
1503 | scene.CommsManager.UserProfileCacheService.GetUserDetails(user); | 1482 | InventoryItemBase assetRequestItem = invService.QueryItem(new InventoryItemBase(notecard)); |
1504 | |||
1505 | if (userInfo == null) | ||
1506 | { | ||
1507 | m_log.ErrorFormat("[PERMISSIONS]: Could not find user {0} for view notecard check", user); | ||
1508 | return false; | ||
1509 | } | ||
1510 | |||
1511 | if (userInfo.RootFolder == null) | ||
1512 | return false; | ||
1513 | |||
1514 | InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(notecard); | ||
1515 | if (assetRequestItem == null) // Library item | 1483 | if (assetRequestItem == null) // Library item |
1516 | { | 1484 | { |
1517 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); | 1485 | assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); |