Class UserService
Inheritance
System.Object
UserService
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public class UserService : Object, IUserService
Constructors
UserService(IApiService)
Declaration
public UserService(IApiService apiService)
Parameters
Methods
ChangeStatus(String, Boolean)
Enables or disables a specific user.
Declaration
public Task ChangeStatus(string username, bool enabled)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.Boolean |
enabled |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
ChangeUsername(String, String)
Changes a user's username.
Declaration
public Task ChangeUsername(string oldUsername, string newUsername)
Parameters
Type |
Name |
Description |
System.String |
oldUsername |
|
System.String |
newUsername |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
CheckPasswordRequirements(String)
Indicates if the proposed password meets complexity requirements.
Declaration
public Task<bool> CheckPasswordRequirements(string password)
Parameters
Type |
Name |
Description |
System.String |
password |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
GetUser(String)
Gets a user's detailed information from their username
.
Declaration
public Task<User> GetUser(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<User> |
|
GetUsername(Int32)
Return's the associateId
's username.
Declaration
public Task<string> GetUsername(int associateId)
Parameters
Type |
Name |
Description |
System.Int32 |
associateId |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.String> |
|
HasRight(String, String)
Returns true if the user, specified by username
, has the specified right
Declaration
public Task<bool> HasRight(string username, string right)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
right |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
RegisterUser(String, String, String, String, String, String, Boolean)
Declaration
public Task<User> RegisterUser(string displayName, string username, string password, string email, string role, string Id, bool corporateUser)
Parameters
Type |
Name |
Description |
System.String |
displayName |
The user's full name.
|
System.String |
username |
The user's username for logging in.
|
System.String |
password |
The user's password for logging in.
|
System.String |
email |
The user's email address.
|
System.String |
role |
The user's assigned role.
|
System.String |
Id |
Optional. The associate's ID may be provided to link this user info to their associate info.
|
System.Boolean |
corporateUser |
Indicates if this is user will have access to the corporate admin site.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<User> |
|
ResetPassword(String, String, String)
Reset's a user's password, requires their current password.
Declaration
public Task ResetPassword(string username, string currentPassword, string newPassword)
Parameters
Type |
Name |
Description |
System.String |
username |
|
System.String |
currentPassword |
|
System.String |
newPassword |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
ValidateUsername(String)
Declaration
public Task ValidateUsername(string username)
Parameters
Type |
Name |
Description |
System.String |
username |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Implements