added handler to fetch credentials (#656)

* added handler to fetch credentials

* added credentials to security service rather than agent service
This commit is contained in:
Aditya Bist
2018-07-13 21:43:59 -07:00
committed by Karl Burtram
parent 626ce35440
commit c0e5225187
5 changed files with 77 additions and 6 deletions

View File

@@ -131,7 +131,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
// Try refresh and check again
this.DataContainer.Server.JobServer.ProxyAccounts.Refresh();
if (this.DataContainer.Server.JobServer.ProxyAccounts.Contains(this.proxyAccountName))
{
{
proxyAccount = AgentProxyAccountActions.GetProxyAccount(this.proxyAccountName, this.DataContainer.Server.JobServer);
// Set the other properties
proxyAccount.CredentialName = proxyInfo.CredentialName;
@@ -209,7 +209,7 @@ namespace Microsoft.SqlTools.ServiceLayer.Agent
}
#endif
}
public bool Create()
{
CreateOrUpdateProxyAccount(this.proxyInfo);