Only support User with Login users (#1931)

* Only support User with Login users

* Use an alternate implementation
This commit is contained in:
Karl Burtram
2023-03-09 14:46:37 -08:00
committed by GitHub
parent 17c9a99d24
commit b53ab57abf

View File

@@ -107,6 +107,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
Urn.EscapeString(parameters.Database));
Database? parentDb = dataContainer.Server.GetSmoObject(databaseUrn) as Database;
existingUser = dataContainer.Server.Databases[parentDb.Name].Users[parameters.Name];
if (string.IsNullOrWhiteSpace(existingUser.Login))
{
throw new ApplicationException("Only 'User with Login' user type supported");
}
userInfo = new UserInfo()
{
Name = parameters.Name,