mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Only support User with Login users (#1931)
* Only support User with Login users * Use an alternate implementation
This commit is contained in:
@@ -107,6 +107,12 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
|
|||||||
Urn.EscapeString(parameters.Database));
|
Urn.EscapeString(parameters.Database));
|
||||||
Database? parentDb = dataContainer.Server.GetSmoObject(databaseUrn) as Database;
|
Database? parentDb = dataContainer.Server.GetSmoObject(databaseUrn) as Database;
|
||||||
existingUser = dataContainer.Server.Databases[parentDb.Name].Users[parameters.Name];
|
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()
|
userInfo = new UserInfo()
|
||||||
{
|
{
|
||||||
Name = parameters.Name,
|
Name = parameters.Name,
|
||||||
|
|||||||
Reference in New Issue
Block a user