aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs8
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs11
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs23
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs6
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs3
-rw-r--r--OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs8
7 files changed, 20 insertions, 43 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index d44eedf..d29d0e4 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -535,7 +535,7 @@ namespace OpenSim
535 } 535 }
536 else 536 else
537 { 537 {
538 m_console.Notice("Create user is not available in grid mode, use the user-server."); 538 m_console.Notice("Create user is not available in grid mode, use the user server.");
539 } 539 }
540 break; 540 break;
541 } 541 }
@@ -800,7 +800,7 @@ namespace OpenSim
800 800
801 if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName)) 801 if (null == m_commsManager.UserService.GetUserProfile(firstName, lastName))
802 { 802 {
803 CreateUser(firstName, lastName, password, email, regX, regY); 803 m_commsManager.UserServiceAdmin.AddUser(firstName, lastName, password, email, regX, regY);
804 } 804 }
805 else 805 else
806 { 806 {
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index fb620c3..7ccb3d4 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -298,11 +298,6 @@ namespace OpenSim
298 m_assetCache = new AssetCache(assetServer); 298 m_assetCache = new AssetCache(assetServer);
299 } 299 }
300 300
301 public UUID CreateUser(string tempfirstname, string templastname, string tempPasswd, string email, uint regX, uint regY)
302 {
303 return m_commsManager.AddUser(tempfirstname, templastname, tempPasswd, email, regX, regY);
304 }
305
306 public void ProcessLogin(bool LoginEnabled) 301 public void ProcessLogin(bool LoginEnabled)
307 { 302 {
308 if (LoginEnabled) 303 if (LoginEnabled)
@@ -314,8 +309,7 @@ namespace OpenSim
314 { 309 {
315 m_log.Info("[Login] Login are now disabled "); 310 m_log.Info("[Login] Login are now disabled ");
316 m_commsManager.GridService.RegionLoginsEnabled = false; 311 m_commsManager.GridService.RegionLoginsEnabled = false;
317 } 312 }
318
319 } 313 }
320 314
321 /// <summary> 315 /// <summary>
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 81cbbb4..50a8e16 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -94,16 +94,11 @@ namespace OpenSim.Region.Communications.Local
94 //no current user account so make one 94 //no current user account so make one
95 m_log.Info("[LOGIN]: No user account found so creating a new one."); 95 m_log.Info("[LOGIN]: No user account found so creating a new one.");
96 96
97 m_userManager.AddUserProfile(firstname, lastname, "test", "", defaultHomeX, defaultHomeY); 97 m_userManager.AddUser(firstname, lastname, "test", "", defaultHomeX, defaultHomeY);
98 98
99 profile = m_userManager.GetUserProfile(firstname, lastname); 99 return m_userManager.GetUserProfile(firstname, lastname);
100 if (profile != null)
101 {
102 m_interServiceInventoryService.CreateNewUserInventory(profile.ID);
103 }
104
105 return profile;
106 } 100 }
101
107 return null; 102 return null;
108 } 103 }
109 104
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index 8649d61..e0c9c83 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -34,13 +34,11 @@ namespace OpenSim.Region.Communications.Local
34{ 34{
35 public class LocalUserServices : UserManagerBase 35 public class LocalUserServices : UserManagerBase
36 { 36 {
37 // private readonly NetworkServersInfo m_serversInfo;
38 private readonly uint m_defaultHomeX; 37 private readonly uint m_defaultHomeX;
39 private readonly uint m_defaultHomeY; 38 private readonly uint m_defaultHomeY;
40 private IInterServiceInventoryServices m_interServiceInventoryService;
41 39
42 /// <summary> 40 /// <summary>
43 /// 41 /// User services used when OpenSim is running in standalone mode.
44 /// </summary> 42 /// </summary>
45 /// <param name="serversInfo"></param> 43 /// <param name="serversInfo"></param>
46 /// <param name="defaultHomeLocX"></param> 44 /// <param name="defaultHomeLocX"></param>
@@ -49,13 +47,12 @@ namespace OpenSim.Region.Communications.Local
49 /// <param name="statsCollector">Can be null if stats collection is not required.</param> 47 /// <param name="statsCollector">Can be null if stats collection is not required.</param>
50 public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY, 48 public LocalUserServices(NetworkServersInfo serversInfo, uint defaultHomeLocX, uint defaultHomeLocY,
51 IInterServiceInventoryServices interServiceInventoryService) 49 IInterServiceInventoryServices interServiceInventoryService)
50 : base(interServiceInventoryService)
52 { 51 {
53 // m_serversInfo = serversInfo; 52 // m_serversInfo = serversInfo;
54 53
55 m_defaultHomeX = defaultHomeLocX; 54 m_defaultHomeX = defaultHomeLocX;
56 m_defaultHomeY = defaultHomeLocY; 55 m_defaultHomeY = defaultHomeLocY;
57
58 m_interServiceInventoryService = interServiceInventoryService;
59 } 56 }
60 57
61 public override UserProfileData SetupMasterUser(string firstName, string lastName) 58 public override UserProfileData SetupMasterUser(string firstName, string lastName)
@@ -72,20 +69,8 @@ namespace OpenSim.Region.Communications.Local
72 } 69 }
73 70
74 Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); 71 Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account");
75 AddUserProfile(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY); 72 AddUser(firstName, lastName, password, "", m_defaultHomeX, m_defaultHomeY);
76 73 return GetUserProfile(firstName, lastName);
77 profile = GetUserProfile(firstName, lastName);
78
79 if (profile == null)
80 {
81 Console.WriteLine("[LOCAL USER SERVICES]: Unknown Master User after creation attempt. No clue what to do here.");
82 }
83 else
84 {
85 m_interServiceInventoryService.CreateNewUserInventory(profile.ID);
86 }
87
88 return profile;
89 } 74 }
90 75
91 public override UserProfileData SetupMasterUser(UUID uuid) 76 public override UserProfileData SetupMasterUser(UUID uuid)
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index e3e69b0..a855617 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -530,7 +530,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
530 // get seed capagentData.firstname = FirstName;agentData.lastname = LastName; 530 // get seed capagentData.firstname = FirstName;agentData.lastname = LastName;
531 if (homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID) == null && !GridMode) 531 if (homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID) == null && !GridMode)
532 { 532 {
533 homeScene.CommsManager.AddUser(agentData.firstname, agentData.lastname, CreateRandomStr(7), "", homeScene.RegionInfo.RegionLocX, homeScene.RegionInfo.RegionLocY, agentData.AgentID); 533 homeScene.CommsManager.UserServiceAdmin.AddUser(
534 agentData.firstname, agentData.lastname, CreateRandomStr(7), "",
535 homeScene.RegionInfo.RegionLocX, homeScene.RegionInfo.RegionLocY, agentData.AgentID);
536
534 UserProfileData userProfile2 = homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID); 537 UserProfileData userProfile2 = homeScene.CommsManager.UserService.GetUserProfile(agentData.AgentID);
535 if (userProfile2 != null) 538 if (userProfile2 != null)
536 { 539 {
@@ -539,7 +542,6 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
539 userProfile.FirstLifeAboutText = "OGP USER"; 542 userProfile.FirstLifeAboutText = "OGP USER";
540 homeScene.CommsManager.UserService.UpdateUserProfile(userProfile); 543 homeScene.CommsManager.UserService.UpdateUserProfile(userProfile);
541 } 544 }
542
543 } 545 }
544 546
545 // Stick our data in the cache so the region will know something about us 547 // Stick our data in the cache so the region will know something about us
diff --git a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
index 7f6fa3c..6577fe3 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/SceneObjectTests.cs
@@ -105,7 +105,8 @@ namespace OpenSim.Region.Environment.Scenes.Tests
105 ((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin()); 105 ((LocalInventoryService)scene.CommsManager.InventoryService).AddPlugin(new TestInventoryDataPlugin());
106 106
107 Assert.That( 107 Assert.That(
108 scene.CommsManager.AddUser("Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId), 108 scene.CommsManager.UserServiceAdmin.AddUser(
109 "Bob", "Hoskins", "test", "test@test.com", 1000, 1000, agentId),
109 Is.EqualTo(agentId)); 110 Is.EqualTo(agentId));
110 111
111 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId); 112 IClientAPI client = SceneTestUtils.AddRootAgent(scene, agentId);
diff --git a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs b/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
index 07cd429..b9804d9 100644
--- a/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
+++ b/OpenSim/Region/Environment/Scenes/Tests/TestCommunicationsManager.cs
@@ -38,13 +38,13 @@ namespace OpenSim.Region.Environment.Scenes.Tests
38 public TestCommunicationsManager() 38 public TestCommunicationsManager()
39 : base(null, null, null, false, null) 39 : base(null, null, null, false, null)
40 { 40 {
41 LocalUserServices lus = new LocalUserServices(null, 991, 992, null);
42 m_userService = lus;
43 m_userServiceAdmin = lus;
44
45 LocalInventoryService lis = new LocalInventoryService(); 41 LocalInventoryService lis = new LocalInventoryService();
46 m_interServiceInventoryService = lis; 42 m_interServiceInventoryService = lis;
47 AddInventoryService(lis); 43 AddInventoryService(lis);
44
45 LocalUserServices lus = new LocalUserServices(null, 991, 992, lis);
46 m_userService = lus;
47 m_userServiceAdmin = lus;
48 } 48 }
49 } 49 }
50} 50}