mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-28 17:24:27 -05:00
Fix lock out for login update (#1923)
* Fix CanEditLockedOutState * fix CanEditLockedOutState * fix locked out
This commit is contained in:
@@ -1422,6 +1422,7 @@ INNER JOIN sys.sql_logins AS sql_logins
|
||||
result.isDisabled = this.isDisabled;
|
||||
result.enforcePolicy = this.enforcePolicy;
|
||||
result.enforceExpiration = this.enforceExpiration;
|
||||
result.isLockedOut = this.isLockedOut;
|
||||
|
||||
result.certificateName = this.certificateName;
|
||||
result.asymmetricKeyName = this.asymmetricKeyName;
|
||||
@@ -2321,7 +2322,7 @@ INNER JOIN sys.sql_logins AS sql_logins
|
||||
&& (this.currentState.IsLockedOut != this.originalState.IsLockedOut)
|
||||
)
|
||||
{
|
||||
throw new ArgumentException("CreateLoginSR.ResetPasswordWhileUnlocking");
|
||||
throw new Exception(SR.ResetPasswordWhileUnlocking);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Security
|
||||
SupportWindowsAuthentication = prototype.WindowsAuthSupported,
|
||||
SupportAADAuthentication = prototype.AADAuthSupported,
|
||||
SupportSQLAuthentication = true, // SQL Auth support for login, not necessarily mean SQL Auth support for CONNECT etc.
|
||||
CanEditLockedOutState = true,
|
||||
CanEditLockedOutState = !parameters.IsNewObject && prototype.IsLockedOut,
|
||||
Databases = databases,
|
||||
Languages = languages,
|
||||
ServerRoles = prototype.ServerRoles.ServerRoleNames,
|
||||
|
||||
Reference in New Issue
Block a user