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