* refactor: Break out IUserServiceAdmin out of IUserService since admin methods don't need to be implemented on Grid hosted region servers
parent
9170361bee
commit
c2ee263999
|
@ -99,6 +99,11 @@ namespace OpenSim.Framework.Communications
|
|||
}
|
||||
protected NetworkServersInfo m_networkServersInfo;
|
||||
|
||||
/// <summary>
|
||||
/// Interface to administrative user service calls.
|
||||
/// </summary>
|
||||
protected IUserServiceAdmin m_userServiceAdmin;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
|
@ -243,7 +248,7 @@ namespace OpenSim.Framework.Communications
|
|||
{
|
||||
string md5PasswdHash = Util.Md5Hash(Util.Md5Hash(password) + ":" + String.Empty);
|
||||
|
||||
m_userService.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY);
|
||||
m_userServiceAdmin.AddUserProfile(firstName, lastName, md5PasswdHash, regX, regY);
|
||||
UserProfileData userProf = UserService.GetUserProfile(firstName, lastName);
|
||||
if (userProf == null)
|
||||
{
|
||||
|
@ -266,7 +271,7 @@ namespace OpenSim.Framework.Communications
|
|||
/// <returns>true if the update was successful, false otherwise</returns>
|
||||
public bool ResetUserPassword(string firstName, string lastName, string newPassword)
|
||||
{
|
||||
return m_userService.ResetUserPassword(firstName, lastName, newPassword);
|
||||
return m_userServiceAdmin.ResetUserPassword(firstName, lastName, newPassword);
|
||||
}
|
||||
|
||||
#region Friend Methods
|
||||
|
|
|
@ -40,8 +40,6 @@ namespace OpenSim.Framework.Communications
|
|||
/// <returns>A user profile. Returns null if no profile is found</returns>
|
||||
UserProfileData GetUserProfile(string firstName, string lastName);
|
||||
|
||||
//UserProfileData GetUserProfile(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Loads a user profile from a database by UUID
|
||||
/// </summary>
|
||||
|
@ -58,12 +56,6 @@ namespace OpenSim.Framework.Communications
|
|||
UserProfileData SetupMasterUser(string firstName, string lastName, string password);
|
||||
UserProfileData SetupMasterUser(UUID userId);
|
||||
|
||||
/// <summary>
|
||||
/// Add a new user profile
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
UUID AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY);
|
||||
|
||||
/// <summary>
|
||||
/// Update the user's profile.
|
||||
/// </summary>
|
||||
|
@ -72,15 +64,6 @@ namespace OpenSim.Framework.Communications
|
|||
/// <returns>true if the update could be applied, false if it could not be applied.</returns>
|
||||
bool UpdateUserProfile(UserProfileData data);
|
||||
|
||||
/// <summary>
|
||||
/// Reset a user password
|
||||
/// </summary>
|
||||
/// <param name="firstName"></param>
|
||||
/// <param name="lastName"></param>
|
||||
/// <param name="newPassword"></param>
|
||||
/// <returns>true if the update was successful, false otherwise</returns>
|
||||
bool ResetUserPassword(string firstName, string lastName, string newPassword);
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new friend to the database for XUser
|
||||
/// </summary>
|
||||
|
|
|
@ -42,7 +42,7 @@ namespace OpenSim.Framework.Communications
|
|||
/// <summary>
|
||||
/// Base class for user management (create, read, etc)
|
||||
/// </summary>
|
||||
public abstract class UserManagerBase : IUserService, IAvatarService
|
||||
public abstract class UserManagerBase : IUserService, IUserServiceAdmin, IAvatarService
|
||||
{
|
||||
private static readonly ILog m_log
|
||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
|
|
@ -383,7 +383,7 @@ namespace OpenSim
|
|||
LocalBackEndServices backendService = new LocalBackEndServices();
|
||||
|
||||
CommunicationsLocal localComms =
|
||||
new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService,
|
||||
new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache, userService, userService,
|
||||
inventoryService, backendService, backendService, m_dumpAssetsToFile);
|
||||
m_commsManager = localComms;
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
BaseHttpServer httpServer,
|
||||
AssetCache assetCache,
|
||||
IUserService userService,
|
||||
IUserServiceAdmin userServiceAdmin,
|
||||
LocalInventoryService inventoryService,
|
||||
IInterRegionCommunications interRegionService,
|
||||
IGridServices gridService, bool dumpAssetsToFile)
|
||||
|
@ -48,6 +49,7 @@ namespace OpenSim.Region.Communications.Local
|
|||
m_defaultInventoryHost = inventoryService.Host;
|
||||
m_interServiceInventoryService = inventoryService;
|
||||
m_userService = userService;
|
||||
m_userServiceAdmin = userServiceAdmin;
|
||||
m_avatarService = (IAvatarService)userService;
|
||||
m_gridService = gridService;
|
||||
m_interRegion = interRegionService;
|
||||
|
|
Loading…
Reference in New Issue