aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorDiva Canto2010-01-01 21:12:46 -0800
committerDiva Canto2010-01-01 21:12:46 -0800
commit8a9677a5319793ff630d0761e204ae8961f375aa (patch)
tree0b92d2c9258383df59866945ebad7ba8479563d0 /OpenSim/Region/CoreModules/World
parentForgotten modules in prior commit. (diff)
downloadopensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.zip
opensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.tar.gz
opensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.tar.bz2
opensim-SC_OLD-8a9677a5319793ff630d0761e204ae8961f375aa.tar.xz
The Library Service is now working. UserProfileCacheService.LibraryRoot is obsolete. Didn't delete it yet to avoid merge conflicts later -- want to stay out of core as much as possible.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs29
1 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index c9b3071..91c0a53 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -95,6 +95,23 @@ namespace OpenSim.Region.CoreModules.World.Permissions
95 95
96 protected Scene m_scene; 96 protected Scene m_scene;
97 97
98 private InventoryFolderImpl m_libraryRootFolder;
99 protected InventoryFolderImpl LibraryRootFolder
100 {
101 get
102 {
103 if (m_libraryRootFolder != null)
104 return m_libraryRootFolder;
105
106 ILibraryService lib = m_scene.RequestModuleInterface<ILibraryService>();
107 if (lib != null)
108 {
109 m_libraryRootFolder = lib.LibraryRootFolder;
110 }
111 return m_libraryRootFolder;
112 }
113 }
114
98 #region Constants 115 #region Constants
99 // These are here for testing. They will be taken out 116 // These are here for testing. They will be taken out
100 117
@@ -1005,9 +1022,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1005 IInventoryService invService = m_scene.InventoryService; 1022 IInventoryService invService = m_scene.InventoryService;
1006 InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); 1023 InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user);
1007 assetRequestItem = invService.GetItem(assetRequestItem); 1024 assetRequestItem = invService.GetItem(assetRequestItem);
1008 if (assetRequestItem == null) // Library item 1025 if (assetRequestItem == null && LibraryRootFolder != null) // Library item
1009 { 1026 {
1010 assetRequestItem = scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); 1027 assetRequestItem = LibraryRootFolder.FindItem(notecard);
1011 1028
1012 if (assetRequestItem != null) // Implicitly readable 1029 if (assetRequestItem != null) // Implicitly readable
1013 return true; 1030 return true;
@@ -1425,9 +1442,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1425 IInventoryService invService = m_scene.InventoryService; 1442 IInventoryService invService = m_scene.InventoryService;
1426 InventoryItemBase assetRequestItem = new InventoryItemBase(script, user); 1443 InventoryItemBase assetRequestItem = new InventoryItemBase(script, user);
1427 assetRequestItem = invService.GetItem(assetRequestItem); 1444 assetRequestItem = invService.GetItem(assetRequestItem);
1428 if (assetRequestItem == null) // Library item 1445 if (assetRequestItem == null && LibraryRootFolder != null) // Library item
1429 { 1446 {
1430 assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(script); 1447 assetRequestItem = LibraryRootFolder.FindItem(script);
1431 1448
1432 if (assetRequestItem != null) // Implicitly readable 1449 if (assetRequestItem != null) // Implicitly readable
1433 return true; 1450 return true;
@@ -1520,9 +1537,9 @@ namespace OpenSim.Region.CoreModules.World.Permissions
1520 IInventoryService invService = m_scene.InventoryService; 1537 IInventoryService invService = m_scene.InventoryService;
1521 InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); 1538 InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user);
1522 assetRequestItem = invService.GetItem(assetRequestItem); 1539 assetRequestItem = invService.GetItem(assetRequestItem);
1523 if (assetRequestItem == null) // Library item 1540 if (assetRequestItem == null && LibraryRootFolder != null) // Library item
1524 { 1541 {
1525 assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); 1542 assetRequestItem = LibraryRootFolder.FindItem(notecard);
1526 1543
1527 if (assetRequestItem != null) // Implicitly readable 1544 if (assetRequestItem != null) // Implicitly readable
1528 return true; 1545 return true;