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:
Karl Burtram
2023-01-31 21:12:53 -08:00
committed by GitHub
parent 9fe3aeddc3
commit 3c25549986
11 changed files with 4819 additions and 1 deletions

View File

@@ -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");
}
}