aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs9
-rw-r--r--OpenSim/Framework/Communications/IUserService.cs17
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs2
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs2
-rw-r--r--OpenSim/Region/Communications/Local/CommunicationsLocal.cs2
5 files changed, 11 insertions, 21 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index 1ac5fe4..27cdd35 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -98,6 +98,11 @@ namespace OpenSim.Framework.Communications
98 get { return m_networkServersInfo; } 98 get { return m_networkServersInfo; }
99 } 99 }
100 protected NetworkServersInfo m_networkServersInfo; 100 protected NetworkServersInfo m_networkServersInfo;
101
102 /// <summary>
103 /// Interface to administrative user service calls.
104 /// </summary>
105 protected IUserServiceAdmin m_userServiceAdmin;
101 106
102 /// <summary> 107 /// <summary>
103 /// Constructor 108 /// Constructor
@@ -243,7 +248,7 @@ namespace OpenSim.Framework.Communications
243 { 248 {
244 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty); 249 string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
245 250
246 m_userService.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY); 251 m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY);
247 UserProfileData userProf = UserService.GetUserProfile(firstName, lastName); 252 UserProfileData userProf = UserService.GetUserProfile(firstName, lastName);
248 if (userProf == null) 253 if (userProf == null)
249 { 254 {
@@ -266,7 +271,7 @@ namespace OpenSim.Framework.Communications
266 /// <returns>true if the update was successful, false otherwise</returns> 271 /// <returns>true if the update was successful, false otherwise</returns>
267 public bool ResetUserPassword(string firstName, string lastName, string newPassword) 272 public bool ResetUserPassword(string firstName, string lastName, string newPassword)
268 { 273 {
269 return m_userService.ResetUserPassword(firstName, lastName, newPassword); 274 return m_userServiceAdmin.ResetUserPassword(firstName, lastName, newPassword);
270 } 275 }
271 276
272 #region Friend Methods 277 #region Friend Methods
diff --git a/OpenSim/Framework/Communications/IUserService.cs b/OpenSim/Framework/Communications/IUserService.cs
index d52d1ea..64c6c68 100644
--- a/OpenSim/Framework/Communications/IUserService.cs
+++ b/OpenSim/Framework/Communications/IUserService.cs
@@ -40,8 +40,6 @@ namespace OpenSim.Framework.Communications
40 /// <returns>A user profile. Returns null if no profile is found</returns> 40 /// <returns>A user profile. Returns null if no profile is found</returns>
41 UserProfileData GetUserProfile(string firstName, string lastName); 41 UserProfileData GetUserProfile(string firstName, string lastName);
42 42
43 //UserProfileData GetUserProfile(string name);
44
45 /// <summary> 43 /// <summary>
46 /// Loads a user profile from a database by UUID 44 /// Loads a user profile from a database by UUID
47 /// </summary> 45 /// </summary>
@@ -59,27 +57,12 @@ namespace OpenSim.Framework.Communications
59 UserProfileData SetupMasterUser(UUID userId); 57 UserProfileData SetupMasterUser(UUID userId);
60 58
61 /// <summary> 59 /// <summary>
62 /// Add a new user profile
63 /// </summary>
64 /// <param name="user"></param>
65 UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
66
67 /// <summary>
68 /// Update the user's profile. 60 /// Update the user's profile.
69 /// </summary> 61 /// </summary>
70 /// <param name="data">UserProfileData object with updated data. Should be obtained 62 /// <param name="data">UserProfileData object with updated data. Should be obtained
71 /// via a call to GetUserProfile().</param> 63 /// via a call to GetUserProfile().</param>
72 /// <returns>true if the update could be applied, false if it could not be applied.</returns> 64 /// <returns>true if the update could be applied, false if it could not be applied.</returns>
73 bool UpdateUserProfile(UserProfileData data); 65 bool UpdateUserProfile(UserProfileData data);
74
75 /// <summary>
76 /// Reset a user password
77 /// </summary>
78 /// <param name="firstName"></param>
79 /// <param name="lastName"></param>
80 /// <param name="newPassword"></param>
81 /// <returns>true if the update was successful, false otherwise</returns>
82 bool ResetUserPassword(string firstName, string lastName, string newPassword);
83 66
84 /// <summary> 67 /// <summary>
85 /// Adds a new friend to the database for XUser 68 /// Adds a new friend to the database for XUser
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 4fc2fea..f06a438 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
42 /// <summary> 42 /// <summary>
43 /// Base class for user management (create, read, etc) 43 /// Base class for user management (create, read, etc)
44 /// </summary> 44 /// </summary>
45 public abstract class UserManagerBase : IUserService, IAvatarService 45 public abstract class UserManagerBase : IUserService, IUserServiceAdmin, IAvatarService
46 { 46 {
47 private static readonly ILog m_log 47 private static readonly ILog m_log
48 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 48 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index 1029d90..4a02264 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -383,7 +383,7 @@ namespace OpenSim
383 LocalBackEndServices backendService = new LocalBackEndServices(); 383 LocalBackEndServices backendService = new LocalBackEndServices();
384 384
385 CommunicationsLocal localComms = 385 CommunicationsLocal localComms =
386 new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, 386 new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, userService,
387 inventoryService, backendService, backendService, m_dumpAssetsToFile); 387 inventoryService, backendService, backendService, m_dumpAssetsToFile);
388 m_commsManager = localComms; 388 m_commsManager = localComms;
389 389
diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
index 6793889..c79979c 100644
--- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
+++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs
@@ -39,6 +39,7 @@ namespace OpenSim.Region.Communications.Local
39 BaseHttpServer httpServer, 39 BaseHttpServer httpServer,
40 AssetCache assetCache, 40 AssetCache assetCache,
41 IUserService userService, 41 IUserService userService,
42 IUserServiceAdmin userServiceAdmin,
42 LocalInventoryService inventoryService, 43 LocalInventoryService inventoryService,
43 IInterRegionCommunications interRegionService, 44 IInterRegionCommunications interRegionService,
44 IGridServices gridService, bool dumpAssetsToFile) 45 IGridServices gridService, bool dumpAssetsToFile)
@@ -48,6 +49,7 @@ namespace OpenSim.Region.Communications.Local
48 m_defaultInventoryHost = inventoryService.Host; 49 m_defaultInventoryHost = inventoryService.Host;
49 m_interServiceInventoryService = inventoryService; 50 m_interServiceInventoryService = inventoryService;
50 m_userService = userService; 51 m_userService = userService;
52 m_userServiceAdmin = userServiceAdmin;
51 m_avatarService = (IAvatarService)userService; 53 m_avatarService = (IAvatarService)userService;
52 m_gridService = gridService; 54 m_gridService = gridService;
53 m_interRegion = interRegionService; 55 m_interRegion = interRegionService;