mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Initial WIP code for user management (#1838)
* Initial user management code * WIP * Fix whitespace * WIP user objects * WIP user objects * Cleanup ported code * WIP * WIP * Update the User contracts * Additional cleanups * Remove warning silencing which isn't intended for this PR * Fix some warnings as error in CI
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
using Microsoft.SqlTools.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.Security.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Create Login parameters
|
||||
/// </summary>
|
||||
public class CreateLoginParams : GeneralRequestDetails
|
||||
{
|
||||
public string OwnerUri { get; set; }
|
||||
|
||||
public LoginInfo Login { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create Login result
|
||||
/// </summary>
|
||||
public class CreateLoginResult : ResultStatus
|
||||
{
|
||||
public LoginInfo Login { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create Login request type
|
||||
/// </summary>
|
||||
public class CreateLoginRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition
|
||||
/// </summary>
|
||||
public static readonly
|
||||
RequestType<CreateLoginParams, CreateLoginResult> Type =
|
||||
RequestType<CreateLoginParams, CreateLoginResult>.Create("security/createlogin");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete Login params
|
||||
/// </summary>
|
||||
public class DeleteLoginParams : GeneralRequestDetails
|
||||
{
|
||||
public string OwnerUri { get; set; }
|
||||
|
||||
public string LoginName { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete Login request type
|
||||
/// </summary>
|
||||
public class DeleteLoginRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Request definition
|
||||
/// </summary>
|
||||
public static readonly
|
||||
RequestType<DeleteLoginParams, ResultStatus> Type =
|
||||
RequestType<DeleteLoginParams, ResultStatus>.Create("security/deletelogin");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user