mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Fix lock out for login update (#1923)
* Fix CanEditLockedOutState * fix CanEditLockedOutState * fix locked out
This commit is contained in:
@@ -9717,6 +9717,14 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
}
|
||||
}
|
||||
|
||||
public static string ResetPasswordWhileUnlocking
|
||||
{
|
||||
get
|
||||
{
|
||||
return Keys.GetString(Keys.ResetPasswordWhileUnlocking);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ConnectionServiceListDbErrorNotConnected(string uri)
|
||||
{
|
||||
return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri);
|
||||
@@ -14038,6 +14046,9 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
public const string DefaultLanguagePlaceholder = "DefaultLanguagePlaceholder";
|
||||
|
||||
|
||||
public const string ResetPasswordWhileUnlocking = "ResetPasswordWhileUnlocking";
|
||||
|
||||
|
||||
private Keys()
|
||||
{ }
|
||||
|
||||
|
||||
@@ -5390,4 +5390,8 @@ The Query Processor estimates that implementing the following index could improv
|
||||
<value><default></value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
<data name="ResetPasswordWhileUnlocking" xml:space="preserve">
|
||||
<value>Reset password for the login while unlocking.</value>
|
||||
<comment></comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -2447,4 +2447,4 @@ ErrorConnectionNotFound = The connection could not be found
|
||||
############################################################################
|
||||
# Security Service
|
||||
DefaultLanguagePlaceholder = <default>
|
||||
|
||||
ResetPasswordWhileUnlocking = Reset password for the login while unlocking.
|
||||
|
||||
@@ -6571,6 +6571,11 @@ The Query Processor estimates that implementing the following index could improv
|
||||
<target state="new"><default></target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
<trans-unit id="ResetPasswordWhileUnlocking">
|
||||
<source>Reset password for the login while unlocking.</source>
|
||||
<target state="new">Reset password for the login while unlocking.</target>
|
||||
<note></note>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -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