mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-18 01:25:41 -05:00
Update User edit handlers (#1903)
* WIP * Update user tests * WIP updates * WIP * Fix several edit use bugs * Disable failing tests * minor updates * Remove unused using
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
using Microsoft.SqlTools.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
{
|
||||
@@ -18,7 +17,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
|
||||
public string? ConnectionUri { get; set; }
|
||||
|
||||
public bool isNewObject { get; set; }
|
||||
public bool IsNewObject { get; set; }
|
||||
|
||||
public string? Database { get; set; }
|
||||
|
||||
@@ -41,7 +40,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
/// <summary>
|
||||
/// Create User parameters
|
||||
/// </summary>
|
||||
public class CreateUserParams : GeneralRequestDetails
|
||||
public class CreateUserParams
|
||||
{
|
||||
public string? ContextId { get; set; }
|
||||
public UserInfo? User { get; set; }
|
||||
@@ -68,6 +67,28 @@ namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
RequestType<CreateUserParams, CreateUserResult>.Create("objectManagement/createUser");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update User parameters
|
||||
/// </summary>
|
||||
public class UpdateUserParams
|
||||
{
|
||||
public string? ContextId { get; set; }
|
||||
public UserInfo? User { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update User request type
|
||||
/// </summary>
|
||||
public class UpdateUserRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition
|
||||
/// </summary>
|
||||
public static readonly
|
||||
RequestType<UpdateUserParams, ResultStatus> Type =
|
||||
RequestType<UpdateUserParams, ResultStatus>.Create("objectManagement/updateUser");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete User params
|
||||
/// </summary>
|
||||
@@ -92,4 +113,25 @@ namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
RequestType<DeleteUserParams, ResultStatus> Type =
|
||||
RequestType<DeleteUserParams, ResultStatus>.Create("objectManagement/deleteUser");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update User params
|
||||
/// </summary>
|
||||
public class DisposeUserViewRequestParams
|
||||
{
|
||||
public string? ContextId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update User request type
|
||||
/// </summary>
|
||||
public class DisposeUserViewRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition
|
||||
/// </summary>
|
||||
public static readonly
|
||||
RequestType<DisposeUserViewRequestParams, ResultStatus> Type =
|
||||
RequestType<DisposeUserViewRequestParams, ResultStatus>.Create("objectManagement/disposeUserView");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user